2.3 GetReportsForAllGPOs.wsf
This
script dumps all GPO information from all GPOs in the domain into XML
and HTML files at the location you specify. The output is everything
from all four tabs in the details pane of the GPMC when you click a
GPO: Scope, Details, Settings, and Delegation.
Syntax
Usage: GetReportsForAllGPOs.wsf ReportLocation [/Domain:value]
ReportLocation: File system location to save reports to.
Domain: DNS name of domain.
Example & Output
This script gathers information about all GPOs in the domain and places the resulting reports in the C:\gpo-reports folder.
cscript GetReportsForAllGPOs.wsf c:\gpo-reports
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.
== Found 2 GPOs in Fabrikam.com
Generating XML report for GPO 'Default Domain Policy'
Generating HTML report for GPO 'Default Domain Policy'
Generating XML report for GPO 'Default Domain Controllers Policy'
Generating HTML report for GPO 'Default Domain Controllers Policy'
Report generation succeeded for 4 reports.
Report generation failed for 0 reports.
2.4 GetReportsForGPO.wsf
This
script dumps the GPO information of the specified GPO into XML and HTML
files at the location you specify. The output is everything from all
four tabs in the GPMC when you click a GPO: Scope, Details, Settings,
and Delegation.
Syntax
Usage: GetReportsForGPO.wsf GPOName ReportLocation [/Domain:value]
GPOName: GPO name or ID.
ReportLocation: File system location for saving the reports.
Domain: DNS name of domain.
Example & Output
This script gathers information about the Default Domain Policy and places the reports in the C:\gpo-reports folder.
cscript GetReportsForGPO.wsf "Default Domain Policy" c:\GPO-Reports
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.
Generating XML report for GPO 'Default Domain Policy'
Generating HTML report for GPO 'Default Domain Policy'
2.5 ListAllGPOs.wsf
This
script lists all of the GPOs in the domain, but not the settings. The
Verbose switch (/v) provides more detailed information about each GPO
in your listing.
Syntax
Usage: ListAllGPOs.wsf /v
/v: Verbose, for detailed information.
Example & Output
This script lists information about all the GPOs in the domain.
cscript ListAllGPOs.wsf
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.
** For detailed info use the '/v' switch **
== Found 2 GPOs in Fabrikam.com ==
Name: Default Domain Policy
ID: {31B2F340-016D-11D2-945F-00C04FB984F9}
Name: Default Domain Controllers Policy
ID: {6AC1786C-016F-11D2-945F-00C04fB984F9}
Example #2 & Output
cscript ListAllGPOs.wsf /v
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.
== Found 2 GPOs in Fabrikam.com ==
Name: Default Domain Policy
ID: {31B2F340-016D-11D2-945F-00C04FB984F9}
-- Details --
Created: 10/31/2007 9:26:20 PM
Changed: 11/2/2007 3:10:54 PM
Owner: FABRIKAM\Domain Admins
User Enabled: True
Mach Enabled: True
-- Version Numbers --
User DS: 0
User Sysvol: 0
Mach DS: 1
Mach Sysvol: 1
-- Who this GPO applies to --
Authenticated Users
-- Who can edit this GPO --
GPO Admins
-- Who can edit settings, modify security and delete this GPO --
SYSTEM
-- Who only has Read access --
ENTERPRISE DOMAIN CONTROLLERS
-- Who has custom permissions --
Domain Admins
Enterprise Admins
-- Where this GPO is linked --
Fabrikam.com (Domain)
Name: Default Domain Controllers Policy
ID: {6AC1786C-016F-11D2-945F-00C04fB984F9}
-- Details --
Created: 10/31/2007 9:26:20 PM
Changed: 11/2/2007 3:10:56 PM
Owner: FABRIKAM\Domain Admins
User Enabled: True
Mach Enabled: True
-- Version Numbers --
User DS: 0
User Sysvol: 0
Mach DS: 1
Mach Sysvol: 1
-- Who this GPO applies to --
Authenticated Users
-- Who can edit this GPO --
GPO Admins
-- Who can edit settings, modify security and delete this GPO --
SYSTEM
-- Who only has Read access --
ENTERPRISE DOMAIN CONTROLLERS
-- Who has custom permissions --
Domain Admins
Enterprise Admins
-- Where this GPO is linked --
Domain Controllers (OU)
2.6 ListSOMPolicyTree.wsf
This
script outputs the Active Directory structure, indicating where GPOs
are linked to the domain, organizational units, and sites.
Syntax
Usage: ListSOMPolicyTree.wsf
Example & Output
The following is an example of generic use of this script to output SOM information about GPOs.
cscript ListSOMPolicyTree.wsf
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.
=== GPO Links for domain Fabrikam.com ===
DC=Fabrikam
GPO=Default Domain Policy
OU=Domain Controllers
GPO=Default Domain Controllers Policy
OU=Servers
OU=Model Office
GPO=Hardened Server GPO
OU=Production
GPO=Hardened Server GPO
OU=Test
OU=Groups
=== GPO Links for sites in forest DC=Fabrikam,DC=com ===
CN=Default-First-Site-Name