Get-Context¶
SYNOPSIS¶
Retrieves a context from the context vault.
SYNTAX¶
Get-Context [[-Name] <String>] [-AsPlainText] [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION¶
Retrieves contexts from a specified context vault. You can specify the name of the context to retrieve or use a wildcard pattern to retrieve multiple contexts. If no name is specified, all contexts from the context vault will be retrieved. Optionally, you can choose to retrieve the contexts as plain text by providing the -AsPlainText switch.
EXAMPLES¶
EXAMPLE 1¶
Get-Context
Get all contexts from the context vault.
EXAMPLE 2¶
Get-Context -Name 'MySecret'
Get the context called 'MySecret' from the vault.
EXAMPLE 3¶
Get-Context -Name 'My*'
Get all contexts that match the pattern 'My*' from the vault.
EXAMPLE 4¶
'My*' | Get-Context
Get all contexts that match the pattern 'My*' from the vault.
PARAMETERS¶
-Name¶
The name of the context to retrieve from the vault. Supports wildcard patterns.
Type: String
Parameter Sets: (All)
Aliases: Context, ContextName
Required: False
Position: 1
Default value: *
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: True
-AsPlainText¶
Switch to retrieve all the contexts secrets as plain text.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction¶
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.