Built-in Policy Definitions Count at Select Scope
Use the below following command to find the overall count of policy definitions within the select scope.
(Get-AzPolicyDefinition -Builtin | select -ExpandProperty Properties | select Displayname).count
this command returns the total count of Built-in Policy Definitions.
Output:
Microsoft Azure – Built-in Policy Definitions and It’s Count using PowerShell
In this article, we will see how we can get the azure built-in policy definitions with their display names and also the count of policy definitions within the select scope in Azure using the Azure PowerShell commands. The purpose of finding to know the policy definition and count which is being applied on the select scope. So, that users can add or exclude the policy definitions according to their project needs. Here the scope represents Subscription, Resource Group, or a Resource.
Contact Us