This cmdlet completely resets the SecretStore by deleting all secret data it may contain, and
resetting configuration options to their default values. It's intended to be used only if a required
password is lost, or data files become corrupted so that SecretStore no longer functions and
secret data can't be accessed.
The default configuration options can be overridden by specifying individual command configuration
option parameters.
Examples
Example 1
PS C:\> Reset-SecretStore -PassThru
WARNING: !!This operation will completely remove all SecretStore module secrets and reset
configuration settings to default values!!
Reset SecretStore
Are you sure you want to erase all secrets in SecretStore and reset configuration
settings to default?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
Creating a new Microsoft.PowerShell.SecretStore vault. A password is required by
the current store configuration.
Enter password:
********
Enter password again for verification:
********
Scope Authentication PasswordTimeout Interaction
----- -------------- --------------- -----------
CurrentUser Password 900 Prompt
This example resets the SecretStore for the current user. The cmdlet warns about the
consequences of this action and prompts the user for confirmation before continuing. After
confirmation, the cmdlet deletes all secrets and sets every configuration setting to its default
value.
Parameters
-Authentication
Specifies how to authenticate access to the SecretStore. The value must be Password or None.
If specified as None, the cmdlet enables access to the SecretStore without a password. The
default authentication is Password.
Caution
Setting the Authentication to None is less secure than Password. Specifying None may be
useful for testing scenarios but shouldn't be used with important secrets.
Parameter properties
Type:
Microsoft.PowerShell.SecretStore.Authenticate
Default value:
Password
Accepted values:
None, Password
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Confirm
Prompts you for confirmation before running the cmdlet.
Indicates that the cmdlet should reset the SecretStore without prompting. By default, the cmdlet
warns about the impact of resetting the SecretStore and prompts the user for confirmation.
Specifies whether the SecretStore should prompt a user when they access it. If the value is
Prompt, the user is prompted for their password in interactive sessions when required. If the
value is None, the user isn't prompted for a password. If the value is None and a password is
required, the cmdlet requiring the password throws a
Microsoft.PowerShell.SecretStore.PasswordRequiredException error.
Parameter properties
Type:
Microsoft.PowerShell.SecretStore.Interaction
Default value:
Prompt
Accepted values:
None, Prompt
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PassThru
Indicates that the cmdlet should return the SecretStore configuration after resetting it. By
default, the cmdlet returns no output.
Specifies the password the SecretStore should require for access. If Authentication is
specified as None, the cmdlet returns an error. If Authentication is Password and this
parameter isn't specified, the cmdlet prompts the user to enter the password securely.
Specifies how long the SecretStore remains unlocked after authenticating with a password. When
the timeout value is reached, the current password value is invalidated for the session. Accessing
the SecretStore after the timeout requires the password again.
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.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.