Sdílet prostřednictvím


Set-SecretStorePassword

Replaces the current SecretStore password with a new one.

Syntaxe

NoParameterSet (Výchozí)

Set-SecretStorePassword
    [<CommonParameters>]

ParameterSet

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

Description

This cmdlet updates the password for SecretStore.

Příklady

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.

Vlastnosti parametru

Typ:SecureString
Default value:None
Podporuje zástupné znaky:False
DontShow:False

Sady parametrů

ParameterSet
Position:Named
Povinné:True
Hodnota z kanálu:True
Hodnota z kanálu podle názvu vlastnosti:False
Hodnota ze zbývajících argumentů: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.

Vlastnosti parametru

Typ:SecureString
Default value:None
Podporuje zástupné znaky:False
DontShow:False

Sady parametrů

ParameterSet
Position:Named
Povinné:False
Hodnota z kanálu:False
Hodnota z kanálu podle názvu vlastnosti:False
Hodnota ze zbývajících argumentů: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.

Vstupy

None

Výstupy

None