Get-AzConfig

In this Azure PowerShell article, we will discuss, the syntax, and usage of the Get-AzConfig Azure PowerShell cmdlet.

Get-AzConfig

Get-AzConfig is an excellent Azure PowerShell cmdlet that can help you to retrieve the lists of all the configs of your Azure PowerShell.

Syntax of Get-AzConfig

Below is the syntax of the Get-AzConfig Azure PowerShell cmdlet.

Get-AzConfig
Get-AzConfig -EnableDataCollection

Example-1:

Execute the below Azure PowerShell cmdlet that can help you to get the config lists for your Azure PowerShell.

Get-AzConfig

After executing the above Azure PowerShell cmdlet, you will get the below output.

PS C:\WINDOWS\system32> Get-AzConfig

Key                          Value Applies To Scope       Help Message                
---                          ----- ---------- -----       ------------                
DefaultSubscriptionForLogin        Az         Default     Subscription name or GUID...
DisplayBreakingChangeWarning True  Az         Default     Controls if warning messa...
DisplayRegionIdentified      True  Az         Default     When enabled, Azure Power...
DisplaySurveyMessage         True  Az         Default     When enabled, you are pro...
EnableDataCollection         True  Az         CurrentUser When enabled, Azure Power...
EnableLoginByWam             False Az         Default     [Preview] When enabled, W...

You can see it here below

Get-AzConfig

Example-2:

Below Azure PowerShell cmdlet can help you to get the config details based on the specific key value provided like EnableDataCollection, EnableLoginByWam, etc.

Get-AzConfig -EnableDataCollection

After executing the above script, you will get the output below

PS C:\WINDOWS\system32> Get-AzConfig -EnableDataCollection 

Key                  Value Applies To Scope       Help Message                        
---                  ----- ---------- -----       ------------                        
EnableDataCollection True  Az         CurrentUser When enabled, Azure PowerShell cm...

You can see that as below

Get-AzConfig -EnableDataCollection

Same way, you can run the below cmdlet.


PS C:\WINDOWS\system32> Get-AzConfig -EnableLoginByWam

Key              Value Applies To Scope   Help Message                                
---              ----- ---------- -----   ------------                                
EnableLoginByWam False Az         Default [Preview] When enabled, Web Account Manag...

You can see it as below

Get AzConfig EnableLoginByWam

You may also like following the below articles

Wrapping Up

In this Azure article, we have discussed the syntax and usage of the Get-AzConfig Azure PowerShell cmdlet with examples. Thanks for reading this article !!!