Unlock-SecretVault
Unlocks an extension vault so that it can be accessed in the current session.
Syntax
Unlock-SecretVault
[-Name] <String>
[-Password] <SecureString>
[<CommonParameters>]
Description
This cmdlet unlocks an extension vault using the provided Password. This allows a vault that requires password authentication to operate without first having to prompt the user. Not all extension vaults require password authentication. The cmdlet returns a warning if the extension vault doesn't support unlocking via password.
Examples
Example 1
Unlock-SecretVault -Name SecretStore -Password $SecurePassword
Get-SecretInfo -Vault SecretStore
Name Type VaultName
---- ---- ---------
Secret1 SecureString SecretStore
Secret2 SecureString SecretStore
This example uses the command to unlock the SecretStore
vault. It then runs the Get-SecretInfo
command on the vault without being prompted for the vault password.
Example 2
Unlock-SecretVault -Name CredMan -Password $SecurePassword
WARNING: Cannot unlock extension vault 'CredMan': The vault does not support the Unlock-SecretVault
function.
This example uses the command to unlock the CredMan
vault. But the vault doesn't support unlocking
so the command has no effect. A warning is displayed informing that CredMan
vault doesn't support
unlocking.
Parameters
-Name
Name of the vault to unlock.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Password
Password used to unlock the vault.
Type: | SecureString |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None