Get-AzContextAutosaveSetting
Display metadata about the context autosave feature, including whether the context is automatically saved, and where saved context and credential information can be found.
Syntax
Get-AzContextAutosaveSetting
[-Scope <ContextModificationScope>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Display metadata about the context autosave feature, including whether the context is automatically saved, and where saved context and credential information can be found.
Examples
Example 1: Get context save metadata for the current session
Get-AzContextAutosaveSetting
Mode : Process
ContextDirectory : None
ContextFile : None
CacheDirectory : None
CacheFile : None
Settings : {}
Get details about whether and where the context is saved. In the above example, the autosave feature has been disabled.
Example 2: Get context save metadata for the current user
Get-AzContextAutosaveSetting -Scope CurrentUser
Mode : CurrentUser
ContextDirectory : C:\Users\contoso\AppData\Roaming\Windows Azure Powershell
ContextFile : AzureRmContext.json
CacheDirectory : C:\Users\contoso\AppData\Roaming\Windows Azure Powershell
CacheFile : TokenCache.dat
Settings : {}
Get details about whether and where the context is saved by default for the current user. Note that this may be different than the settings that are active in the current session. In the above example, the autosave feature has been enabled, and data is saved to the default location.
Parameters
-DefaultProfile
The credentials, account, 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 |
-Scope
Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user.
Type: | ContextModificationScope |
Accepted values: | Process, CurrentUser |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None