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

Removes cached login token for a profile.

Syntax

Invoke-AWSLogout
-All <SwitchParameter>

Description

The Invoke-AWSLogout cmdlet removes cached login token for a profile. To use the profile again, run the Invoke-AWSLogin cmdlet.

Parameters

Indicates if CmdLet log out of all profiles that use Login credentials at once.
Required?False
Position?Named
Accept pipeline input?False

Common Credential and Region Parameters

-ProfileName <String>
Name of the profile in the shared configuration file '~/.aws/config'.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)

Outputs

None
This cmdlet does not generate any output.

Examples

Example 1

Invoke-AWSLogout -ProfileName "aws-login-test-profile"
Logs out from a specific profile named "aws-login-test-profile".

Example 2

Invoke-AWSLogout -All
Logs out from all profiles that use login sessions. This will remove all cached login tokens.

Supported Version

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