Compartir a través de


Unlock-SecretStore

Unlocks SecretStore with the provided password.

Sintaxis

Default (Es el valor predeterminado).

Unlock-SecretStore
    -Password <SecureString>
    [-PasswordTimeout <Int32>]
    [<CommonParameters>]

Description

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.

Ejemplos

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.

Parámetros

-Password

Specifies the password needed to access the SecretStore.

Propiedades del parámetro

Tipo:SecureString
Valor predeterminado:None
Admite caracteres comodín:False
DontShow:False

Conjuntos de parámetros

(All)
Posición:Named
Mandatory:True
Valor de la canalización:True
Valor de la canalización por nombre de propiedad:True
Valor de los argumentos restantes: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.

Propiedades del parámetro

Tipo:Int32
Valor predeterminado:None
Admite caracteres comodín:False
DontShow:False

Conjuntos de parámetros

(All)
Posición:Named
Mandatory:False
Valor de la canalización:False
Valor de la canalización por nombre de propiedad:False
Valor de los argumentos restantes: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.

Entradas

SecureString

Salidas

None