Action Sets
  • 20 Dec 2024
  • 5 Minutes to read
  • Dark
    Light
  • PDF

Action Sets

  • Dark
    Light
  • PDF

Article summary

Get-LiquitActionSet

Synopsis

This command displays a list of all action sets belonging to a package snapshot, or selects a certain action set.

Syntax

 Get-LiquitActionSet 
    [-Snapshot] <PackageSnapshot> 
    [-LiquitContext <LiquitContext>]  
    [<CommonParameters>]

 Get-LiquitActionSet 
    [-Snapshot] <PackageSnapshot> 
    [-Type] {Distribute | Install | Launch | Uninstall | Repair} 
    [-LiquitContext <LiquitContext>]
    [<CommonParameters>]

Get-LiquitActionSet 
    [-Snapshot] <PackageSnapshot> 
    [-ID] <guid[]> 
    [-LiquitContext <LiquitContext>]
    [<CommonParameters>]

 Get-LiquitActionSet 
    [-Snapshot] <PackageSnapshot> 
    [-EntityRef] <EntityRef[]> 
    [-LiquitContext <LiquitContext>]  
    [<CommonParameters>]
    
Get-LiquitActionSet
    [-Search] <string> 
    [-LiquitContext <LiquitContext>]
    [<CommonParameters>]

Get-LiquitActionSet
    [-Name] <string> 
    [-LiquitContext <LiquitContext>]  
    [<CommonParameters>]

Examples

Example 1: Get-LiquitActionSet

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 $snapshot = Get-LiquitPackageSnapshot -Package $package -id 00000000-0000-0000-0000-000000000000
 Get-LiquitActionSet -Snapshot $snapshot

This command lists all available action sets of a package snapshot.

Example 2: Get-LiquitPackageSnapshot

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 $snapshot = Get-LiquitPackageSnapshot -Package $package -id 00000000-0000-0000-0000-000000000000
 Get-LiquitActionSet -Snapshot $snapshot -Type 'Distribute'

This command selects only the distribute type action sets of the package snapshot.

Example 3: Get-LiquitPackageSnapshot

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 $snapshot = Get-LiquitPackageSnapshot -Package $package -id 00000000-0000-0000-0000-000000000000
 Get-LiquitActionSet -Snapshot $snapshot -id 00000000-0000-0000-0000-000000000000

This command selects the action set with the id 00000000-0000-0000-0000-000000000000.

Parameters

NameValueDescriptionRequiredDefault value
Snapshot<PackageSnapshot>The snapshot that should be retrieved.
Type{Distribute | Install | Launch | Uninstall | Repair}The type of the action set:
  • Distribute - 0
  • Install - 1
  • Launch - 2
  • Uninstall - 3
  • Repair - 4
Yes
Search<string>You can search by the name of the action sets, using a wildcard.
Name<string>Searches on the action set name itself.
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

New-LiquitActionSet

Synopsis

This command creates a new action set.

Syntax

 New-LiquitActionSet 
    [-Snapshot] <PackageSnapshot> 
    [-Type] {Distribute | Install | Launch | Uninstall | Repair} 
    [-Name <string>]
    [-Collection <string>] 
    [-Enabled <bool>]
    [-Frequency {Always | OncePerUser | OncePerDevice}] 
    [-Process {Sequential | SequentialIgnoreError | StopAtFirstEffectiveAction | StopAtFirstSuccessfulAction}] 
    [-Position <int>] 
    [-LiquitContext <LiquitContext>] 
    [-WhatIf] 
    [-Confirm]
    [<CommonParameters>]

Example

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 $snapshot = Get-LiquitPackageSnapshot -Package $package -id 00000000-0000-0000-0000-000000000000
 New-LiquitActionSet -snapshot $snapshot -Type Install -name 'PowerShell ActionSet' -Enabled $true -Frequency Always -Process Sequential

This command creates a new action set with the name "PowerShell ActionSet".

Parameters

NameValueDescriptionRequiredDefault value
Snapshot<PackageSnapshot>The snapshot that should get a new action setYes
Type{Distribute | Install | Launch | Uninstall | Repair}The type of the action set:
  • Distribute
  • Install
  • Launch
  • Uninstall
  • Repair
Yes
Name<string>Provide a name for the action set.No
Collection<string>The name of the shortcut for your action set. Available only for a Launch type action set.
Frequency{Always | OncePerUser | OncePerDevice}Depending on the action set type there will be different options:
  • Always - the action will always be executed.
  • Once per user - the action will be executed only once per user.
  • Once per device - the action will be executed only once per device.
Process<string>Determines the execution order of the actions within the action set:
  • Sequential - The actions in the action set are executed in order, stopping at the first error.
  • SequentialIgnoreError -The actions in the action set are executed in order, ignoring errors.
  • StopAtFirstEffectiveAction - The first effective action in the action set will be executed while the rest will be ignored.
  • StopAtFirstSuccessfulAction - The first successful action in the action set will be executed while the rest will be ignored.
No
Position<int>Liquit Workspace groups action sets by their type. You can change the position of an action set inside a group of action sets.Yes0
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Move-LiquitActionSet

Synopsis

This command moves the action set to a different position.

Syntax

 Move-LiquitActionSet
	[-ActionSet] <ActionSet[]> 
	[-Position] <int> 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf] 
	[-Confirm]
	[<CommonParameters>]

Example

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 $snapshot = Get-LiquitPackageSnapshot -package $package -id 00000000-0000-0000-0000-000000000000
 $actionset = Get-LiquitActionSet -SnapShot $snapshot
 Move-LiquitActionSet -ActionSet $actionset -position 1

This command moves an existing action set to position 1. For content or package reference actions, see the examples of New-LiquitActionSet.

Parameters

NameValueDescriptionRequiredDefault value
ActionSet<ActionSet[]>The action set(s) that should be moved.Yes
Position<int>Determines the new position.Yes0
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Set-LiquitActionSet

Synopsis

This command edits the properties of a snapshot.

Syntax

Set-LiquitActionSet 
    [-ActionSet] <ActionSet[]> 
    [-Name <string>] 
    [-Collection <string>]
    [-Enabled <bool>] 
    [-Frequency {Always | OncePerUser | OncePerDevice}] 
    [-Process {Sequential | SequentialIgnoreError | StopAtFirstEffectiveAction | StopAtFirstSuccessfulAction}]
    [-LiquitContext <LiquitContext>] 
    [-WhatIf] 
    [-Confirm]  
    [<CommonParameters>] 

Example

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 $snapshot = Get-LiquitPackageSnapshot -package $package -id 00000000-0000-0000-0000-000000000000
 $actionset = Get-LiquitActionSet -SnapShot $snapshot
 Set-LiquitActionSet -ActionSet $actionset -name 'Updated PowerShell Action Set'

This command updates an existing action set and renames it "Updated PowerShell Action Set".

Parameters

NameValueDescriptionRequiredDefault value
ActionSet<ActionSet[]>The action set or an array of action sets to be updated.Yes
Name<string>Provide a name for the action set(s).No
Enabled<bool>Determines whether or not the action set(s) will be enabled.No
Collection<string>The name of the shortcut for your action set. Available only for a Launch type action set.
Frequency{Always | OncePerUser | OncePerDevice}Depending on the action set type there will be different options:
  • Always - the action will always be executed.
  • Once per user - the action will be executed only once per user.
  • Once per device - the action will be executed only once per device.
Process<string>Determines the execution order of the actions within the action set:
  • Sequential - The actions in the action set are executed in order, stopping at the first error.
  • SequentialIgnoreError -The actions in the action set are executed in order, ignoring errors.
  • StopAtFirstEffectiveAction - The first effective action in the action set will be executed while the rest will be ignored.
  • StopAtFirstSuccessfulAction - The first successful action in the action set will be executed while the rest will be ignored.
No
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Remove-LiquitActionSet

Synopsis

This command removes an action set from the Liquit Workspace.

Syntax

 Remove-LiquitActionSet 
	[-ActionSet] <ActionSet[]> 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf] 
	[-Confirm]  
	[<CommonParameters>]

Example

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 $snapshot = Get-LiquitPackageSnapshot -package $package -id 00000000-0000-0000-0000-000000000000
 $actionset = Get-LiquitActionSet -SnapShot $snapshot
 Remove-LiquitActionSet -ActionSet $actionset

Parameters

NameValueDescriptionRequiredDefault value
ActionSet<ActionSet[]>The action set or an array of action sets to be removed.Yes
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Was this article helpful?

What's Next