external help file | Module Name | ms.date | online version | schema |
---|---|---|---|---|
Microsoft.PowerShell.SecretStore.dll-Help.xml |
Microsoft.PowerShell.SecretStore |
05/31/2022 |
2.0.0 |
Replaces the current SecretStore password with a new one.
Set-SecretStorePassword [<CommonParameters>]
Set-SecretStorePassword -NewPassword <SecureString> [-Password <SecureString>] [<CommonParameters>]
This cmdlet updates the password for SecretStore.
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.
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.
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
Parameter Sets: ParameterSet
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
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
Parameter Sets: ParameterSet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.