Returns information about the Scope of Management (SOM) used in applying Group Policy to a computer. To return information about Group Policy applied to the logged-on user, change the WMI class from root\rsop\computer to root\rsop\user
strComputer = "."Set objWMIService = GetObject _("winmgmts:\\" & strComputer & "\root\rsop\computer")Set colItems = objWMIService.ExecQuery("Select * from RSOP_SOM")For Each objItem in colItemsWscript.Echo "ID: " & objItem.IDWscript.Echo "Blocked: " & objItem.BlockedWscript.Echo "Blocking: " & objItem.BlockingWscript.Echo "Reason: " & objItem.ReasonWscript.Echo "SOM Order: " & objItem.SOMOrderWscript.Echo "Type: " & objItem.TypeWscript.EchoNext
This is a VB Script, this can be used by saving the file in .vbs file