Action Sets
  • 18 Dec 2023
  • 3 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} 
	[-LiquitContext <LiquitContext>]
	[<CommonParameters>]

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

 Get-LiquitActionSet 
	[-Snapshot] <PackageSnapshot> 
	[-EntityRef] <EntityRef[]> 
	[-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.

New-LiquitActionSet

Synopsis

This command creates a new action set.

Syntax

 New-LiquitActionSet 
	[-Snapshot] <PackageSnapshot> 
	[-Type] {Distribute | Install | Launch | Uninstall} 
	[-Name <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
 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}The type of the action set:
  • Distribute
  • Install
  • Launch
  • Uninstall
Yes
Name<string>Provide a name for the action set.No
Process<string>The process of the action set:
  • Sequential
  • SequentialIgnoreError
  • StopAtFirstEffectiveAction
  • StopAtFirstSuccessfulAction
No
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>] 
	[-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
Frequency{Always | OncePerUser | OncePerDevice}] [-Process {Sequential | SequentialIgnoreError | StopAtFirstEffectiveAction | StopAtFirstSuccessfulAction}The process of the action set:
  • Sequential
  • SequentialIgnoreError
  • StopAtFirstEffectiveAction
  • StopAtFirstSuccessfulAction
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