DESKTOP

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

11/13/2013 8:31:01 PM

1. Deleting GPOs

1.1 DeleteGPO.wsf

This script deletes the GPO with the name you specify in the command. It also deletes all links to the GPO in the specified domain and related sites. If you prefer that the links remain intact, specify the KeepLinks switch in the command.

Syntax
Usage: deletegpo.wsf GPOName [/KeepLinks] [/Domain:value]
GPOName: Name or GUID of the GPO to delete.
KeepLinks: Deletes the GPO but does not delete the links.
Domain: DNS name of domain.

Example & Output

This script deletes the GPO named New Group Policy Object.

cscript deletegpo.wsf "New Group Policy Object"
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Deleted GPO {305C5727-64AD-4FF1-AD7E-560655C7C39F}

Deleting links for GPO 'New Group Policy Object' in domain 'Fabrikam.com'
No links found.

2. GPO Reporting

Whether you are auditing the environment or just documenting the GPO infrastructure, you will want to report on a variety of aspects of the GPO environment. These scripts allow you to report on individual GPOs, their settings, and the GPO environment.

2.1 DumpGPOInfo.wsf

This script reports, or dumps, information regarding the specified GPO or GUID and then prints information about that GPO on the screen.

Syntax
Usage: dumpgpoinfo.wsf GPOName [/Domain:value]
GPOName: GPO name or ID.
Domain: DNS name of domain.

Example & Output

This script gathers information about the Default Domain Policy and lists it on the screen.

cscript dumpgpoinfo.wsf "Default Domain Policy"
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

==============================================
Name: Default Domain Policy
ID: {31B2F340-016D-11D2-945F-00C04FB984F9}

-- Details --
Created: 10/31/2007 9:26:20 PM
Changed: 10/31/2007 9:26:20 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 --

-- 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 (Sites,Domain,OU) --
Fabrikam.com (Domain)


2.2 DumpSOMInfo.wsf

This script takes a specified scope of management (SOM) and outputs policy information about it. It displays the linked GPOs and the policy permissions regarding the node in Active Directory about which you are inquiring. The SOMName can be the domain name, an organizational unit, or a site. If you also want to show the inherited GPO links, you can use the ShowInheritedLinks switch.

Syntax
Usage: dumpsominfo.wsf SOMName [/ShowInheritedLinks] [/Domain:value]
SOMName: Name of the SOM to query.
ShowInheritedLinks: Shows inherited GPO links for the SOM.
Domain: DNS name of domain.

Example & Output

This script focuses on the organizational unit named Servers OU, reporting on all of the GPOs that are associated with it, including the links that are inherited from other nodes above it in the Active Directory structure.

cscript dumpsominfo.wsf "Servers OU" /ShowInheritedLinks
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

==============================================
Name: Servers OU
Type: Organizational Unit
Path: OU=Servers,DC=Fabrikam,DC=com

-- Inherited GPO Links --
1 Server GPO
2 Default Domain Policy

-- Who can link GPOs to this OU --
Domain Admins
SYSTEM
Enterprise Admins
Administrators

-- Who can generate RSoP logging data for this OU --
Domain Admins
SYSTEM
Enterprise Admins
Administrators

-- Who can generate RSoP planning data for this OU --
Domain Admins
SYSTEM
Enterprise Admins
Administrators
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
    Edifier E30 Spinnaker - By The Horns
    The drive toward DSLs : Running the Scheduling DSL
    Buyers’ Guide – Tablets: When Size Matters (Part 2)
    Chat In The Dock (Part 2)
    OCZ Vertex 3.20 Solid State Drive Review (Part 4)
    Windows 8 MSI Slidebook S20 Ultrabook Review (Part 1)
    BlackBerry Z10 – Is It Enough To Take On Android And iOS?
    ASP.NET 4.0 : Data Source Components (part 5) - The ObjectDataSource Control - Setting Up for Paging , Updating and Deleting Data
    Apps Of This November (Part 1)
    Disgo 9104 - An Android Tablet That Runs On Ice Cream Sandwich
    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)