Unlock-SecretStore
Unlocks SecretStore with the provided password.
Sintassi
Default (impostazione predefinita).
Unlock-SecretStore
-Password <SecureString>
[-PasswordTimeout <Int32>]
[<CommonParameters>]
Descrizione
This cmdlet unlocks the SecretStore for the current user with the provided password. It can be used to unlock the SecretStore when the configuration requires a password and the prompt configuration option is disabled. The SecretStore remains unlocked in the session until its configured password timeout elapses.
Esempio
Example 1
PS C:\> Get-Secret Secret1 -Vault LocalStore
Get-Secret: A valid password is required to access the Microsoft.PowerShell.SecretStore vault.
Get-Secret: The secret Secret1 wasn't found.
PS C:\> Unlock-SecretStore
cmdlet Unlock-SecretStore at command pipeline position 1
Supply values for the following parameters:
SecureStringPassword: *******
PS C:\> Get-Secret Secret1 -Vault LocalStore
System.Security.SecureString
In this example, Get-Secret
fails to retrieve Secret1
because the SecretStore vault is
locked. Unlock-SecretStore
unlocks the vault. The cmdlet prompts for the password because the
Password parameter wasn't specified. With the vault unlocked, Get-Secret
returns Secret1
as
a SecureString object.
Parametri
-Password
Specifies the password needed to access the SecretStore.
Proprietà dei parametri
Tipo: | SecureString |
Valore predefinito: | None |
Supporta i caratteri jolly: | False |
DontShow: | False |
Set di parametri
(All)
Posizione: | Named |
Obbligatorio: | True |
Valore dalla pipeline: | True |
Valore dalla pipeline in base al nome della proprietà: | True |
Valore dagli argomenti rimanenti: | False |
-PasswordTimeout
Specifies how many seconds the SecretStore remains unlocked after authenticating with a password. This parameter overrides the configured password timeout value. After the timeout has elapsed, the current password value is invalidated for the session. Accessing the SecretStore after the timeout requires the password again.
Proprietà dei parametri
Tipo: | Int32 |
Valore predefinito: | None |
Supporta i caratteri jolly: | False |
DontShow: | False |
Set di parametri
(All)
Posizione: | Named |
Obbligatorio: | False |
Valore dalla pipeline: | False |
Valore dalla pipeline in base al nome della proprietà: | False |
Valore dagli argomenti rimanenti: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.