Udostępnij za pośrednictwem


Set-SecretStorePassword

Replaces the current SecretStore password with a new one.

Składnia

NoParameterSet (Domyślna)

Set-SecretStorePassword
    [<CommonParameters>]

ParameterSet

Set-SecretStorePassword
    -NewPassword <SecureString>
    [-Password <SecureString>]
    [<CommonParameters>]

Opis

This cmdlet updates the password for SecretStore.

Przykłady

Example 1

PS C:\> Set-SecretStorePassword
Old password
Enter password:
*******
New password
Enter password:
*******
Enter password again for verification:
*******

This example runs the command with no parameter arguments. The user is first prompted for the old password. And then prompted for the new password twice for verification.

Example 2

PS C:\> Set-SecretStorePassword -NewPassword $newPassword -Password $oldPassword

This example runs the command passing in both the current store password and the new password to be set.

Parametry

-NewPassword

Specifies the new password for accessing the SecretStore. If this parameter isn't specified and the cmdlet is run in an interactive session, it prompts the user for the value. If this parameter is not specified and the cmdlet is run in a non-interactive session, it returns an error.

Właściwości parametru

Typ:SecureString
Domyślna wartość:None
Obsługuje symbole wieloznaczne:False
DontShow:False

Zestawy parametrów

ParameterSet
Position:Named
Obowiązkowy:True
Wartość z potoku:True
Wartość z potoku według nazwy właściwości:False
Wartość z pozostałych argumentów:False

-Password

Existing password needed to unlock the store. This can be ignored if the store doesn't currently use a password.

Specifies the existing password for accessing the SecretStore. If the SecretStore isn't configured to require a password, this parameter is ignored.

If the SecretStore is configured to require a password, this parameter isn't specified, and the cmdlet is run in an interactive session, it prompts the user for the value. If the SecretStore is configured to require a password, this parameter isn't specified and the cmdlet is run in a non-interactive session, it returns an error.

Właściwości parametru

Typ:SecureString
Domyślna wartość:None
Obsługuje symbole wieloznaczne:False
DontShow:False

Zestawy parametrów

ParameterSet
Position:Named
Obowiązkowy:False
Wartość z potoku:False
Wartość z potoku według nazwy właściwości:False
Wartość z pozostałych argumentów: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.

Dane wejściowe

None

Dane wyjściowe

None