Enable-AzContextAutosave
Azure contexts are PowerShell objects representing your active subscription to run commands against, and the authentication information needed to connect to an Azure cloud. With Azure contexts, Azure PowerShell doesn't need to reauthenticate your account each time you switch subscriptions. For more information, see Azure PowerShell context objects.
This cmdlet allows the Azure context information to be saved and automatically loaded when you start a PowerShell process. For example, when opening a new window.
Enable-AzContextAutosave
[-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Allows the Azure context information to be saved and automatically loaded when a PowerShell process starts. The context is saved at the end of the execution of any cmdlet that affects the context. For example, any profile cmdlet. If you're using user authentication, then tokens can be updated during the course of running any cmdlet.
Turn on credential autosave for the current user. Whenever a PowerShell window is opened, your current context is remembered without logging in.
Enable-AzContextAutosave
Allow the Azure credential, account, and subscription information, to be saved and automatically loaded when you open a PowerShell window in this PowerShell session. (autogenerated)
Enable-AzContextAutosave -Scope Process
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The credentials, tenant, and subscription used for communication with Azure
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Determines the scope of context changes. For example, whether changes apply only to the current
process, or to all sessions started by this user. Changes made with the scope CurrentUser
will
affect all PowerShell sessions started by the user. If a particular session needs to have different
settings, use the scope Process
.
Type: | ContextModificationScope |
Accepted values: | Process, CurrentUser |
Position: | Named |
Default value: | CurrentUser |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet isn't run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
None
Azure PowerShell feedback
Azure PowerShell is an open source project. Select a link to provide feedback: