This cmdlet configures the SecretStore for the current user.
Examples
Example 1
PS C:\> Set-SecretStoreConfiguration -Default
Confirm
Are you sure you want to perform this action?
Performing the operation "Changes local store configuration" on target "SecretStore module local store".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
Scope Authentication PasswordTimeout Interaction
----- -------------- --------------- -----------
CurrentUser Password 900 Prompt
This example restores the SecretStore to its default configuration.
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
Supports wildcards:
False
DontShow:
False
Parameter sets
ParameterSet
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.
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:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
ParameterSet
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 updating it. By
default, the cmdlet returns no output.
Specifies the password needed to access the SecretStore. This parameter can't be used to change
the existing password. To change the existing password, use Set-SecretStorePassword.
When this parameter is used with the Authenticate parameter to change the configuration for
authentication from None to Password, this parameter's value is set as the new password for the
SecretStore.
When this parameter is used with the Authenticate parameter to change the configuration for
authentication from Password to None, this parameter's value must be the current password for
the SecretStore. It's used to authorize the configuration change.
Specifies how many seconds the SecretStore remains unlocked after authenticating with a
password. After the timeout has elapsed, 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.