- 09 Oct 2024
- 5 Minutes to read
- Print
- DarkLight
- PDF
Actions
- Updated on 09 Oct 2024
- 5 Minutes to read
- Print
- DarkLight
- PDF
Get-LiquitAction
Synopsis
This command displays a list of actions belonging to an action set.
Syntax
Get-LiquitAction
[-ActionSet] <ActionSet>
[-LiquitContext <LiquitContext>]
[<CommonParameters>]
Get-LiquitAction
[-ActionSet] <ActionSet>
[-Type] <string[]>
[-LiquitContext <LiquitContext>]
[<CommonParameters>]
Get-LiquitAction
[-ActionSet] <ActionSet>
[-ID] <guid[]>
[-LiquitContext <LiquitContext>]
[<CommonParameters>]
Get-LiquitAction
[-ActionSet] <ActionSet>
[-EntityRef] <EntityRef[]>
[-LiquitContext <LiquitContext>]
[<CommonParameters>]
Get-LiquitAction
[-ActionSet] <ActionSet>
[-Search] <string>
[-LiquitContext <LiquitContext>]
[<CommonParameters>]
Get-LiquitAction
[-ActionSet] <ActionSet>
[-Name] <string>
[-LiquitContext <LiquitContext>]
[<CommonParameters>]
Examples
Example 1: Get-LiquitAction
$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
Get-LiquitAction -ActionSet $actionset
This command lists all actions available within the selected action set.
Example 2: Get-LiquitAction
$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
Get-LiquitAction -ActionSet $actionset -Type 'pathmsiinstall'
This command selects only the “Install MSI” type action.
Example 3: Get-LiquitAction
$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
Get-LiquitAction -ActionSet $actionset -id 00000000-0000-0000-0000-000000000000
This command will display the selected action.
Parameters
Name | Value | Description | Required | Default value |
---|---|---|---|---|
ActionSet | <ActionSet[]> | The actionset that should be retrieved. | No | |
Type | <string> | The type of action that should be retrieved. | No | |
Search | <string> | It enables users to search multiple columns within the table of the actions set from the Liquit Workspace UI, such as Name and Type. When a search term is provided, the parameter filters records by matching values in these indexed columns. However, it's important to note that not all columns in the table are indexed, meaning that searches for values in these non-indexed columns will not return results. Non-indexed columns include for example the ID and columns containing checkboxes. | No | |
Name | <string> | Searches on the action name itself. | No | |
LiquitContext | <LiquitContext> | Determines the selected zone. | No | Default |
New-LiquitAction
Synopsis
This command creates a new action.
Syntax
New-LiquitAction
[-ActionSet] <ActionSet[]>
[-Name] <string>
[-Type] <string>
[-Enabled <bool>]
[-IgnoreErrors <bool>]
[-Settings <hashtable>]
[-Context {Device | User | ElevatedUser | Server}]
[-Position <int>]
[-LiquitContext <LiquitContext>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Examples
Example 1: New-LiquitAction
$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
$action = New-LiquitAction -ActionSet $actionset -Name 'PowerShell Action' -Type 'pathmsiinstall' -Enabled $true -IgnoreErrors $true -Settings @{path ='C:\';arguments = '/qn';transform =' ';}
This command creates a new action with the name "PowerShell Action".
Example 2: New-LiquitAction with content
$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
$action = New-LiquitAction -ActionSet $actionset -Name 'Place uploaded file' -Type 'contentcopy' -Enabled $true -IgnoreErrors $true -Settings @{content = '4DF9E0F8.Netflix_6.95.602.0_x64__mcm4njqhnhss8.Appx'; destination ='c:\windows\temp';}
$content = New-LiquitContent -Path 'C:\install\4DF9E0F8.Netflix_6.95.602.0_x64__mcm4njqhnhss8.Appx' -FileName '4DF9E0F8.Netflix_6.95.602.0_x64__mcm4njqhnhss8.Appx'
$attribute = New-LiquitAttribute -Entity $action -Link $content -ID 'content' -Settings: @{filename = '4DF9E0F8.Netflix_6.95.602.0_x64__mcm4njqhnhss8.Appx'}
This command creates a new action for placing an uploaded file. Content actions require an attribute with a link to the content object.
Example 3: New-LiquitAction with a package reference
$packageRef = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
$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
$action = New-LiquitAction -ActionSet $actionset -Name 'Install package' -Type 'installpackage' -Enabled $true -IgnoreErrors $true -Settings @{title = '7-zip'; value = `$packageRef.ID`;}
$attribute = New-LiquitAttribute -Entity $action -Link $packageRef -ID 'package'
This command creates a new action for installing another package. Package reference actions require an attribute with a link to the package object.
See Actions for a complete list of all possible action types.
Parameters
Name | Value | Description | Required | Default value |
---|---|---|---|---|
Name | <string> | Provide a name for the action. | Yes | |
ActionSet | <ActionSet[]> | The actionset that should get a new action. | Yes | |
Type | <string> | The type of action that should be added. | Yes | |
Enabled | <bool> | Determines whether or not the action is enabled. | No | True |
IgnoreErrors | <bool> | Determines whether or not the errors should be ignored. | No | False |
Settings | <hashtable> | A hash table with the settings for the action. | No | |
Position | <int> | Determines the new position | No | |
Context | {Device | User | ElevatedUser | Server} | Defines the context in which the action should be executed:
| No | Device |
LiquitContext | <LiquitContext> | Determines the selected zone. | No | Default |
Move-LiquitAction
Synopsis
This command moves the action to a different position.
Syntax
Move-LiquitAction
[-Action] <Action[]>
[-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
$action = Get-LiquitAction -ActionSet $actionset
Move-LiquitAction -action $action -position 1
This command moves the selected action to position 1. For content or package reference actions, see the examples of New-LiquitAction.
Parameters
Name | Value | Description | Required | Default value |
---|---|---|---|---|
Action | <Action[]> | The action(s) that should be moved. | Yes | |
Position | <int> | Determines the new position. | Yes | 0 |
LiquitContext | <LiquitContext> | Determines the selected zone. | No | Default |
Set-LiquitAction
Synopsis
This command edits the properties of an action.
Syntax
Set-LiquitAction
[-Action] <Action[]>
[-Name <string>]
[-Enabled <bool>]
[-IgnoreErrors <bool>]
[-Settings <hashtable>]
[-Context {Device | User | ElevatedUser | Server}]
[-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
$action = Get-LiquitAction -ActionSet $actionset
Set-LiquitAction -action $action -name ‘Updated PowerShell Action’
This command updates the name of the selected action to "'Updated PowerShell Action ". For content or package reference actions, see the examples of New-LiquitAction.
Parameters
Name | Value | Description | Required | Default value |
---|---|---|---|---|
Action | <Action[]> | The action(s) that should get a new action | Yes | |
Enabled | <bool> | Determines whether or not the action is enabled | No | True |
IgnoreErrors | <bool> | Determines whether or not the errors should be ignored | No | False |
Name | <string> | Provide a name for the action | No | |
Settings | <hashtable> | A Hashtable with the settings for the action | No | |
Context | {Device | User | ElevatedUser | Server} | Defines the context in which the action should be executed:
| No | Device |
LiquitContext | <LiquitContext> | Determines the selected zone | No | Default |
Remove-LiquitAction
Synopsis
This command removes an action from the Liquit Workspace.
Syntax
Remove-LiquitAction
[-Action] <Action[]>
[-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
$action = Get-LiquitAction -ActionSet $actionset
Remove-LiquitAction -Action $action
This command removes the selected action from the Liquit Workspace.
Parameters
Name | Value | Description | Required | Default value |
---|---|---|---|---|
Action | <Action[]> | The action to be removed | Yes | |
LiquitContext | <LiquitContext> | Determines the selected zone | No | Default |