< Back
Remove-AzureRmContext
Post
NAME Remove-AzureRmContext
SYNOPSIS
Remove a context from the set of available contexts
SYNTAX
Remove-AzureRmContext [-DefaultProfile <IAzureContextContainer>] [-Force] -InputObject <PSAzureContext> [-PassThru] [-Scope {Process |
CurrentUser}] [-Confirm] [-WhatIf] [<CommonParameters>]
Remove-AzureRmContext [-Name] <String> [-DefaultProfile <IAzureContextContainer>] [-Force] [-PassThru] [-Scope {Process | CurrentUser}] [-Confirm]
[-WhatIf] [<CommonParameters>]
DESCRIPTION
Remove an azure context from the set of contexts
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>]
Remove context even if it is the defualt
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-InputObject <PSAzureContext>
A context object, normally passed through the pipeline.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-Name <String>
The name of the context
Required? true
Position? 0
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Return the removed context
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Scope <ContextModificationScope>
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this
user
Required? false
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
Microsoft.Azure.Commands.Profile.Models.PSAzureContext
NOTES
Example 1
PS C:\\> Remove-AzureRmContext -Name Default
Remove the context named default
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ermcontext
SYNOPSIS
Remove a context from the set of available contexts
SYNTAX
Remove-AzureRmContext [-DefaultProfile <IAzureContextContainer>] [-Force] -InputObject <PSAzureContext> [-PassThru] [-Scope {Process |
CurrentUser}] [-Confirm] [-WhatIf] [<CommonParameters>]
Remove-AzureRmContext [-Name] <String> [-DefaultProfile <IAzureContextContainer>] [-Force] [-PassThru] [-Scope {Process | CurrentUser}] [-Confirm]
[-WhatIf] [<CommonParameters>]
DESCRIPTION
Remove an azure context from the set of contexts
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>]
Remove context even if it is the defualt
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-InputObject <PSAzureContext>
A context object, normally passed through the pipeline.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-Name <String>
The name of the context
Required? true
Position? 0
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Return the removed context
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Scope <ContextModificationScope>
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this
user
Required? false
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
Microsoft.Azure.Commands.Profile.Models.PSAzureContext
NOTES
Example 1
PS C:\\> Remove-AzureRmContext -Name Default
Remove the context named default
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ermcontext