Clears the values of configs that are set by the user. By default all the configs will be cleared. You can also specify keys of configs to clear.
Examples
Example 1
Clear-AzConfig -Force
Clear all the configs. -Force suppresses the prompt for confirmation.
Example 2
Clear-AzConfig -EnableDataCollection
Clear the "EnableDataCollection" config.
Parameters
-AppliesTo
Specifies what part of Azure PowerShell the config applies to.
Possible values are:
"Az": the config applies to all modules and cmdlets of Azure PowerShell.
Module name: the config applies to a certain module of Azure PowerShell.
For example, "Az.Storage".
Cmdlet name: the config applies to a certain cmdlet of Azure PowerShell.
For example, "Get-AzKeyVault".
If not specified, when getting or clearing configs, it defaults to all the above; when updating, it defaults to "Az".
Set it to true to disable both instance discovery and authority validation. This functionality is intended for use in scenarios where the metadata endpoint cannot be reached, such as in private clouds or Azure Stack. The process of instance discovery entails retrieving authority metadata from https://login.microsoft.com/ to validate the authority. By setting this to true, the validation of the authority is disabled. As a result, it is crucial to ensure that the configured authority host is valid and trustworthy.
Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release.
When enabled, Azure PowerShell cmdlets send telemetry data to Microsoft to improve the customer experience.
For more information, see our privacy statement: https://aka.ms/privacy
[Preview] When enabled, Web Account Manager (WAM) will be the default interactive login experience.
It will fall back to using the browser if the platform does not support WAM.
Note that this feature is under preview. Microsoft Account (MSA) is currently not supported.
Feel free to reach out to Azure PowerShell team if you have any feedbacks: https://aka.ms/azpsissue
Only active when authenticating interactively, allows the user to choose the subscription and tenant used in subsequent commands. Possible values ad 'On' (Default) and 'Off'. 'On' requires user's input. 'Off' will use the first tenant and subscription returned by Azure, can change without notice and lead to command execution in an unwanted context (not recommended).
Determines the scope of config changes, for example, whether changes apply only to the current process, or to all sessions started by this user.
By default it is CurrentUser.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.