AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Clears the persisted credentials associated with the credential profile names 'default' and 'AWS PS Default', plus any credentials and region data currently set in the session's shell variables. To clear the stored default credentials only, use the -SkipShell parameter. To affect the current shell only, use the -SkipProfileStore parameter.

Syntax

Clear-AWSDefaultConfiguration
-SkipShell <SwitchParameter>
-SkipProfileStore <SwitchParameter>
-Scope <VariableScope>

Description

Clears the persisted credentials associated with the credential profile names 'default' and 'AWS PS Default', plus any credentials and region data currently set in the session's shell variables. To clear the stored default credentials only, use the -SkipShell parameter. To affect the current shell only, use the -SkipProfileStore parameter. Note: For scripts written against earlier versions of this module this cmdlet can also be invoked with the alias Clear-AWSDefaults.

Note: For scripts written against earlier versions of this module this cmdlet can also be invoked with the alias, Clear-AWSDefaults.

Parameters

-Scope <VariableScope>
This parameter allows to specify the scope of the shell variables to clear. For details about variables scopes see https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_scopes. This parameter cannot be used when SkipShell is specified.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SkipProfileStore <SwitchParameter>
If set, the cmdlet will not clear the 'default' and 'AWS PS Default' profiles held in the credentials store.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SkipShell <SwitchParameter>
If set, the cmdlet will not clear the current shell state.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio for the 'default' and 'AWS PS Default' profiles. If the profiles are not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation

Outputs

None
This cmdlet does not generate any output.

Supported Version

AWS Tools for PowerShell: 2.x.y.z