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.
示例
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.
参数
-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.
参数属性
类型:
Microsoft.PowerShell.SecretStore.Authenticate
默认值:
Password
接受的值:
None, Password
支持通配符:
False
不显示:
False
参数集
(All)
Position:
Named
必需:
False
来自管道的值:
False
来自管道的值(按属性名称):
False
来自剩余参数的值:
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.
参数属性
类型:
Microsoft.PowerShell.SecretStore.Interaction
默认值:
Prompt
接受的值:
None, Prompt
支持通配符:
False
不显示:
False
参数集
(All)
Position:
Named
必需:
False
来自管道的值:
False
来自管道的值(按属性名称):
False
来自剩余参数的值:
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.