Contexts

Get-LiquitContext

This command displays a list of all contexts known within Application Workspace or you can select a specific context.

Syntax

Get-LiquitContext 
   [-LiquitContext <LiquitContext>]  
   [<CommonParameters>]

Get-LiquitContext 
   [-ID] <guid[]> 
   [-LiquitContext <LiquitContext>]  
   [<CommonParameters>]

Get-LiquitContext 
   [-IdentityRef] <IdentityRef[]> 
   [-LiquitContext <LiquitContext>]  
   [<CommonParameters>]

Get-LiquitContext 
   [-Type] {Script | Filter} 
   [-LiquitContext <LiquitContext>]  
   [<CommonParameters>]
   
Get-LiquitContext 
    [-Search] <string> 
    [-LiquitContext <LiquitContext>]
    [<CommonParameters>]

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

Examples

This command displays all contexts known within Application Workspace:

 Get-LiquitContext

This command selects all contexts of the Script type:

 Get-LiquitContext-type Script

This command selects a specific context with the id 00000000-0000-0000-0000-000000000000:

 Get-LiquitContext-id 00000000-0000-0000-0000-000000000000

Parameters

NameValueDescriptionRequiredDefault value
Search<string> This parameter serves a similar purpose to the search box found in the contexts table from the Application Workspace UI. It enables users to search multiple columns within the table, 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.

Name<string> Searches on the context name itself.

LiquitContext<LiquitContext>Determines the selected zone.NoDefault




New-LiquitContext

This command creates a new context.

Syntax

 New-LiquitContext 
   [-Name] <string> 
   [-Filters <ContextFilters> 
   [-Filter] 
   [-Description <string>] 
   [-Enabled <bool>]
   [-Priority <int>] 
   [-Authenticator <bool>] 
   [-LiquitContext <LiquitContext>] 
   [-WhatIf] 
   [-Confirm]
   [<CommonParameters>]

 New-LiquitContext 
   [-Name] <string> 
   -Script 
   -ScriptContent <string> 
   [-Description <string>] 
   [-Enabled <bool>]
   [-Priority <int>] 
   [-Authenticator <bool>] 
   [-LiquitContext <LiquitContext>]
   [-WhatIf] 
   [-Confirm]
   [<CommonParameters>]

Examples

This command creates a new context with the name "PowerShell Context":

    New-LiquitContext -Filter  -Name 'PowerShell Context'  -Filters @{operator = "and"; sets =@()}

For all available filters see Filters.

This command creates a new context named 'PowerShell Script Context' using a script-based context and sets its script content to 'true:

    New-LiquitContext -Script -Name 'PowerShell Script Context'  -ScriptContent 'true'

Parameters

NameValueDescriptionRequiredDefault value
Name<string>Provide a name for the context.Yes
Filter
Determines whether or not the context is of the Filter typeFilter type only
Filters<ContextFilters>A hash table with filters.Filter type only
Script
Determines whether or not the context is of the Script type.Script type only
ScriptContent<string>Provide a script for the context.Script type only
Description<string>Provide a description for the context.No
Enabled<bool>Determines whether or not the context is enabled.No
Priority<int>Determines the priority of the context.No
Authenticator<bool>Determines if the authenticator is used for the context.NoFalse
LiquitContext<LiquitContext>Determines the selected zone.NoDefault




Set-LiquitContext

This command lets you edit the properties of a context.

Syntax

 Set-LiquitContext
   [-Context] <Context[]> 
   [-Name <string>] 
   [-Description <string>] 
   [-Priority <int>] 
   [-Authenticator <bool>] 
   [-Enabled <bool>] 
   [-ScriptContent <string>] 
   [-Filters <ContextFilters>] 
   [-LiquitContext <LiquitContext>] 
   [-WhatIf] 
   [-Confirm]  
   [<CommonParameters>]

Example

The following script updates an existing context and renames it "Updated PowerShell Context":

    $context = Get-LiquitContext -id 00000000-0000-0000-0000-000000000000
    Set-LiquitContext -Context $context -Name ‘Updated PowerShell Context’

Parameters

NameValueDescriptionRequiredDefault value
Name<string>Provide a name for the context.Yes
Filters<ContextFilters>A hash table with filters.Filter type only
ScriptContent<string>Provide a script for the context.Script type only
Description<string>Provide a description for the context.No
Enabled<bool>Determines whether or not the context is enabled.No
Priority<int>Determines the priority of the context.No
Authenticator<bool>Determines if the authenticator is used for the context.NoFalse
LiquitContext<LiquitContext>Determines the selected zone.NoDefault




Remove-LiquitContext

This command removes a context from the Application Workspace.

Syntax

 Remove-LiquitContext 
   [-Context] <Context[]> 
   [-LiquitContext <LiquitContext>] 
   [-WhatIf] 
   [-Confirm]  
   [<CommonParameters>]

Example

The following script removes the selected context from Application Workspace:

      $context = Get-LiquitContext -id 00000000-0000-0000-0000-000000000000
     Remove-LiquitContext -Context $context

Parameters

NameValueDescriptionRequiredDefault value
Context<Context>The context you wish to remove.Yes
LiquitContext<LiquitContext>Determines the selected zone.NoDefault




New-LiquitContextFilterSet

This command lets you create a new filter set for a context.

Syntax

New-LiquitContextFilterSet 
    [-Filters <ContextFilterFilter[]>] 
    [-LiquitContext <LiquitContext>] 
    [-WhatIf] 
    [-Confirm]  
    [<CommonParameters>]




New-LiquitContextFilterFilter

This command lets you create a new filter within a set.

Syntax

New-LiquitContextFilterFilter [
    [-Settings] <hashtable>] 
    [-Type] <string>
    [[-Value] <string>] 
    [[-Operator] {Equal | NotEqual | Contains | NotContains | StartsWith | EndsWith | GreaterThan | LessThan}] 
    [-LiquitContext <LiquitContext>] 
    [-WhatIf] 
    [-Confirm]  
    [<CommonParameters>]




New-LiquitContextFilters

This command allows you to define the logical operator applied between filter sets—either AND or OR. The selected operator also determines the logic applied within each filter set. Specifically, if you choose AND as the operator between filter sets, the filters within each set will be combined using OR. Conversely, if you choose OR between filter sets, the filters within each set will be combined using AND.

Syntax

New-LiquitContextFilters 
    [[-Operator] {And | Or}] 
    [-Sets <ContextFilterSet[]>]
    [-LiquitContext <LiquitContext>] 
    [-WhatIf] 
    [-Confirm]  
    [<CommonParameters>]