CARVIEW |
Select Language
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 2949
Connection: keep-alive
Date: Mon, 28 Jul 2025 02:01:23 GMT
Content-Encoding: gzip
Server: Server
Cache-Control: no-store, no-cache, must-revalidate
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=47304000; includeSubDomains
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Content-Type-Options: nosniff
Content-Security-Policy: upgrade-insecure-requests; script-src 'self' 'unsafe-inline' *.awsstatic.com *.cdn.uis.awsstatic.com *.cdn.console.awsstatic.com d2c.aws.amazon.com a0.awsstatic.com *.feedback.console.aws.dev insights.docs.aws.com wss://insights.docs.aws.com/prod; object-src 'none';
Last-Modified: Fri, 25 Jul 2025 20:48:20 GMT
ETag: "LxQ/+Cf7MZo5FaeZClfU1WCPmiw=-gzip"
Accept-Ranges: bytes
Vary: Accept-Encoding
X-Cache: Miss from cloudfront
Via: 1.1 7d1975e97f05a3fc47c8f5eea10222bc.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: BOM78-P5
X-Amz-Cf-Id: nvRX2mV4241TbNduJ2X54YBdH12s85sz6EkiVeEf44vGu990eyBbdg==
Shell Configuration: Clear-AWSCredential Cmdlet | AWS Tools for PowerShell
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.
Clear-AWSCredential Cmdlet
Shell ConfigurationAvailable in AWS.Tools.Common, AWSPowerShell.NetCore and AWSPowerShell
Synopsis
Clears the set of AWS credentials currently set as default in the shell or, if supplied with a name, deletes the set of credentials associated with the supplied name from the local credentials store.
Syntax
Clear-AWSCredential-Scope <VariableScope>
Description
Clears the set of AWS credentials currently set as default in the shell
Note: For scripts written against earlier versions of this module this cmdlet can also be invoked with the alias Clear-AWSCredentials.
Note: For scripts written against earlier versions of this module this cmdlet can also be invoked with the alias, Clear-AWSCredentials.
Note: For scripts written against earlier versions of this module this cmdlet can also be invoked with the alias, Clear-AWSCredentials.
Parameters
-Scope <VariableScope>
This parameter allows to specify the scope of the variable $StoredAWSCredentials 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 ProfileName is specified.
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 first. If the profile is 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) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Outputs
None
This cmdlet does not generate any output.
Examples
Example 1
Clear-AWSCredentialClears any credentials set as default in the current shell. The stored profiles are not affected.
Related Links
Supported Version
AWS Tools for PowerShell: 2.x.y.z