Contexts

Prev Next

Get-LiquitContext

Synopsis

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

Example 1: Get-LiquitContext

 Get-LiquitContext

This command displays all contexts known within Application Workspace.

Example 3: Get-LiquitContext

 Get-LiquitContext-type Script

This command selects all contexts of the Script type.

Example 3: Get-LiquitContext

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

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

Parameters

Name Value Description Required Default 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. No Default

New-LiquitContext

Synopsis

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

Example 1: New-LiquitContext

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

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

For all available filters see Filters.

Example 2: New-LiquitContext

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

Parameters

Name Value Description Required Default value
Name <string> Provide a name for the context. Yes
Filter Determines whether or not the context is of the Filter type Filter 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. No False
LiquitContext <LiquitContext> Determines the selected zone. No Default

Set-LiquitContext

Synopsis

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

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

This command updates an existing context and renames it "Updated PowerShell Context".

Parameters

Name Value Description Required Default 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. No False
LiquitContext <LiquitContext> Determines the selected zone. No Default

Remove-LiquitContext

Synopsis

This command removes a context from the Application Workspace.

Syntax

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

Example

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

This command removes the selected context from Application Workspace.

Parameters

Name Value Description Required Default value
Context <Context> The context you wish to remove. Yes
LiquitContext <LiquitContext> Determines the selected zone. No Default