< Back

Clear-AzureRmContext

Tue Jan 29, 2019 9:59 pm

NAME Clear-AzureRmContext



SYNOPSIS

Remove all Azure credentials, account, and subscription information.





SYNTAX

Clear-AzureRmContext [-DefaultProfile <IAzureContextContainer>] [-Force] [-PassThru] -Scope {Process | CurrentUser} [-Confirm] [-WhatIf]

[<CommonParameters>]





DESCRIPTION

Remove all Azure Credentials, account, and subscription information.





PARAMETERS

-DefaultProfile <IAzureContextContainer>

The credentials, tenant and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Delete all users and groups from the global scope without prompting



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

Return a value indicating success or failure



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Scope <ContextModificationScope>

Clear the context only for the current PowerShell session, or for all sessions.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None







OUTPUTS

System.Boolean

True if the context was successfully cleared, false otherwise.





NOTES









Clear global context



PS C:\\> Clear-AzureRmContext -Scope CurrentUser



Remove all account, subscription, and credential information for any powershell session.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ermcontext