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.
Esempio
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.
Parametri
-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.
Proprietà dei parametri
Tipo:
Microsoft.PowerShell.SecretStore.Authenticate
Valore predefinito:
Password
Valori accettati:
None, Password
Supporta i caratteri jolly:
False
DontShow:
False
Set di parametri
(All)
Posizione:
Named
Obbligatorio:
False
Valore dalla pipeline:
False
Valore dalla pipeline in base al nome della proprietà:
False
Valore dagli argomenti rimanenti:
False
-Confirm
Prompts you for confirmation before running the cmdlet.
Valore dalla pipeline in base al nome della proprietà:
False
Valore dagli argomenti rimanenti:
False
-Force
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.
Valore dalla pipeline in base al nome della proprietà:
False
Valore dagli argomenti rimanenti:
False
-Interaction
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.
Proprietà dei parametri
Tipo:
Microsoft.PowerShell.SecretStore.Interaction
Valore predefinito:
Prompt
Valori accettati:
None, Prompt
Supporta i caratteri jolly:
False
DontShow:
False
Set di parametri
(All)
Posizione:
Named
Obbligatorio:
False
Valore dalla pipeline:
False
Valore dalla pipeline in base al nome della proprietà:
False
Valore dagli argomenti rimanenti:
False
-PassThru
Indicates that the cmdlet should return the SecretStore configuration after resetting it. By
default, the cmdlet returns no output.
Valore dalla pipeline in base al nome della proprietà:
False
Valore dagli argomenti rimanenti:
False
-Password
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.
Valore dalla pipeline in base al nome della proprietà:
False
Valore dagli argomenti rimanenti:
False
-PasswordTimeout
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.
Valore dalla pipeline in base al nome della proprietà:
False
Valore dagli argomenti rimanenti:
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.
L'origine di questo contenuto è disponibile in GitHub, in cui è anche possibile creare ed esaminare i problemi e le richieste pull. Per ulteriori informazioni, vedere la guida per i collaboratori.