Count Number of Group Policies Object On Windows Server 2012 / 2016 Domain

This article will show how to use Windows PowerShell to count the number of Group Policies object configured on a Windows Server 2016 or 2012 domain environment.

To count the number Of Group Policy Object use the cmdlet below:

First, Open PowerShell and load the group policy module:

get-command –module grouppolicy

Once loaded run the cmdlet below (In my case I have 4 GPO objects)

get-gpo -All -Domain test.local | measure

To get all Group Policy objects Name use:

get-gpo -All -Domain test.local | select displayname, id


Posted

in

by