Set-SecretStorePassword
Replaces the current SecretStore password with a new one.
Syntax
Set-SecretStorePassword []
Set-SecretStorePassword
-NewPassword <SecureString>
[-Password <SecureString>]
[<CommonParameters>]
Description
This cmdlet updates the password for SecretStore.
Examples
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.
Parameters
-NewPassword
Specifies the new password for accessing the SecretStore. If this parameter is not 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.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | 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 is not configured to require a password, this parameter is ignored.
If the SecretStore is configured to require a password, this parameter is not 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 is not specified and the cmdlet is run in a non-interactive session, it returns an error.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
None