GPMC Scripts

These are the scripts that is contained as standard when you install GPMC.

The scripts are located at %ProgramFiles%\GPMC\Scripts. Read the file gpmc.chm contained in this folder first for more explanation and examples of how to use the scripts which you might find useful before you start.

Backup GPO
BackupAllGPOs.wsf <BackupLocation> [/Comment:<Comment>] [/Domain:<DNSDomain>]

Backup all GPOs
BackupAllGPOs.wsf <BackupLocation> [/Comment:<Comment>] [/Domain:<DNSDomain>]

Copy a GPO
CopyGPO.wsf <SourceGPO> <TargetGPO> [/SourceDomain:<DNSDomainName>] [/TargetDomain:<DNSDomainName>] [/SourceDC:<DomainController>] [/TargetDC<DomainController>] [/MigrationTable<MigrationTable>] [/CopyACL]

Creating a GPO
CreateGPO.wsf <GPOName> [/Domain:<DNSDomainName>]

Creating a Policy Environment Using an XML File
CreateEnvironmentFromXML.wsf /xml:<XmlFile> [/undo] [/Domain:<DNSDomainName>] [/dc:<DomainControllerName>] [/ExcludeSettings] [/ExcludePermissions] [/MigrationTable:<FilePath>]

Creating an XML File that Represents a Policy Environment
CreateXMLFromEnvironment.wsf <OutputFile> [/Domain:<DNSDomainName>] [/dc:<DomainControllerName>] [/TemplatePath:<Path>] [/StartingOU:<LDAPPath>] [/ExcludePermissions] [/IncludeAllGroups] [/IncludeUsers]

Create Migration Table
CreateMigrationTable.wsf <TableName> [/GPO:<GPO Name>] [/BackupLocation:<FilePath>] [/AllGPOs] [/Overwrite] [/MapByName] [/Domain:<DNSDomainName>]

Delete a GPO
DeleteGPO.wsf <GPOName> [/KeepLinks] [/Domain:<DNSDomainName>]

Grant Permissions for all GPOs in a Domain
GrantPermissionOnAllGPOs.wsf <Group Name> /Permission: <Permission Level> [/Replace] [/Domain:<DNSDomainName>]

Importing a GPO
ImportGPO.wsf <BackupLocation> <BackupID> [TargetGPO] [/MigrationTable:<FilePath>] [/CreateIfNeeded] [/Domain:<DNSDomainName>]

Importing Multiple GPOs into a Domain
ImportAllGPOs.wsf <BackupLocation> [/MigrationTable:<FilePath>] [Domain:<DNSDomainName>]

Restore a GPO
RestoreGPO.wsf <BackupLocation> <BackupID> [/Domain:<Domain>] [/DC:<DomainController>]

Restoring all GPOs in a Domain
RestoreAllGPOs.wsf <BackupLocation> [/Domain:<DNSDomainName>]

Setting GPO Permissions
SetGPOPermissions.wsf:<GPOName><GroupName> /Permission:<PermissionLevel> [/Replace] [/Domain:<DNSDomainName>]

Setting Permissions for All GPOs Linked to a Scope of Management
SetGPOPermissionsBySOM.wsf <SOM Name> <Group Name> /Permission: <PermissionLevel> [/Recursive] [/Replace] [/Domain:<DNSDomainName>]

Setting Permissions to Create GPOs
SetGPOCreationPermissions.wsf <GroupName> [Remove] [/Domain:<DNSDomainName>]

Setting Policy-related Permissions on a SOM
SetSOMPermissions.wsf <SOM Name> <Group Name> /Permission:<PermissionLevel> [/Inherit] [/Domain:<DNSDomainName>]

Listing All GPOs in a Domain
ListAllGPOs.wsf [/v] [/Domain:<DNSDomainName>]

Listing Disabled GPOs
FindDisabledGPOs.wsf [/Domain:<DNSDomainName>]

Listing GPO Information
DumpGPOInfo.wsf GPOName [/Domain:<DNSDomainName>]

Listing GPOs at a Backup Location
QueryBackupLocation.wsf <path> [/Verbose]

Listing GPOs by Policy Extension
FindGPOsByPolicyExtension.wsf <ExtensionID> [/PrintCSE] [/Domain:<DNSDomainName>]

Listing GPOs by Security Group
FindGPOsBySecurityGroup.wsf <GroupName> /Permission:<PermissionLevel> [/Effective] [/Domain:<DNSDomainName>] [/None]

Listing GPOs orphaned in SYSVOL
FindOrphanGPOsInSYSVOL.wsf [/Domain:<DNSDomainName>]

Listing GPOs with Duplicate Names
FindDuplicateNamedGPOs.wsf [/Domain:<DNSDomainName>]

Listing GPOs Without Security Filtering
FindGPOsWithNoSecurityFiltering.wsf [/Domain:<DNSDomainName>]

Listing SOM Information
DumpSOMInfo.wsf <SOM Name> [/ShowInherited] [/Domain:<DNSDomainName>]

Listing SOMs With Links to GPOs in External Domains
FindsSOMsWithExternalGPOLinks.wsf [/Domain:<DNSDomainName>]

Listing Unlinked GPOs in a Domain
FindUnlinkedGPOs.wsf [/Domain:<DNSDomainName>]

Printing the SOM Policy Tree
ListSOMPolicyTree.wsf [/Domain:<DNSDomainName>]

Generate Reports for all GPOs
GetReportsForAllGPOs.wsf <ReportLocation> [/Domain:<DNSDomainName>]

Generate Reports for a GPO
GetReportsForGPO.wsf <GPOName> <ReportLocation> [/Domain:<DNSDomainName>]


Technorati Tags: , ,
Share

Comments are closed.