DESKTOP

Windows Server 2008 and Windows Vista : GPMC Scripts - GPO Reporting (part 2)

11/13/2013 8:31:59 PM

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
Other  
  •  Windows Server 2008 and Windows Vista : GPMC Scripts - Copying and Importing GPOs
  •  Windows Server 2008 and Windows Vista : Copying and Importing GPOs
  •  Windows Server 2008 and Windows Vista : Backing Up and Restoring GPOs (part 2)
  •  Windows Server 2008 and Windows Vista : Backing Up and Restoring GPOs (part 1)
  •  Windows Small Business Server 2011 : Creating Custom Alerts - Creating an Alert for a Stopped Service, Custom Alert for Backup Failure
  •  Windows Small Business Server 2011 : Configuring Alerts - Alerts for Services, Performance Counter Alert, Event Log Error Alerts
  •  Windows Small Business Server 2011 : Network Reports (part 2) - Customizing the Detailed Network Report
  •  Windows Small Business Server 2011 : Network Reports (part 1) - Customizing the Summary Report
  •  Windows 8 : Diagnosis and Recovery - Windows Recovery Environment
  •  Windows 8 : Diagnosis and Recovery - Refresh and Reset
  •  
    Most View
    Windows Phone 8 : Working with the Camera (part 1) - Using the PhotoCamera Class
    Macro Marvels (Part 3)
    Nikon Coolpix S3500 – Providing 7x Optic Zoom Lens At Low Price (Part 1)
    Creating Custom Workflows with SharePoint Designer 2010 (part 2) - Workflow Actions, Creating a Simple Workflow
    Nook, Nook. Who’s There…?
    Web Security : Automating with LibWWWPerl - Uploading Malicious File Contents, Uploading Files with Malicious Names
    Macbook Pro: The Inner Beauty (Part 2)
    Sony Xperia V Review – Water-Resistant Smartphone
    The Download Directory - November 2012 (Part 1) - USB Disk Security 6.2, WindowBlinds 7.4
    SQL Server 2005 : Dynamic T-SQL - Dynamic SQL Security Considerations
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    VIDEO TUTORIAL
    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
    Popular Tags
    Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
    Top 10
    3 Tips for Maintaining Your Cell Phone Battery (part 2) - Discharge Smart, Use Smart
    3 Tips for Maintaining Your Cell Phone Battery (part 1) - Charge Smart
    OPEL MERIVA : Making a grand entrance
    FORD MONDEO 2.0 ECOBOOST : Modern Mondeo
    BMW 650i COUPE : Sexy retooling of BMW's 6-series
    BMW 120d; M135i - Finely tuned
    PHP Tutorials : Storing Images in MySQL with PHP (part 2) - Creating the HTML, Inserting the Image into MySQL
    PHP Tutorials : Storing Images in MySQL with PHP (part 1) - Why store binary files in MySQL using PHP?
    Java Tutorials : Nested For Loop (part 2) - Program to create a Two-Dimensional Array
    Java Tutorials : Nested For Loop (part 1)