Active Directory, GPMC, Group Policy Objects, Group Policy Preferences

Create GPO Migration Table

Need to migrate GPOs from one forest to another. No point in manually completing this task.

Create Migration Table

The CreateMigrationTable.wsf sample creates a file that contains the XML representation of the paths and the security principals for the specified GPO source.

You can specify one of the following GPO sources:

  • An individual GPO
  • A backup location
  • All the GPOs in a domain

Then, you can use the resulting XML when you perform GPO import and copy operations, which are typically performed across domains.

  • Use the GPO switch to use a single GPO source when you build the XML migration table.
  • Use the BackupLocation switch to use GPO backups as a source when you  build the XML migration table.
  • Use the AllGPOs switch to use all the GPOs in the domain as a source to build the XML migration table.
  • Use the Overwrite switch to overwrite an existing XML file instead of appending to it.
  • Use the MapByName switch to specify a corresponding account with the same name as the original in the destination domain.
Usage:  CreateMigrationTable.wsf <TableName> [/GPO:<GPO Name>] [/BackupLocation:<FilePath>] [/AllGPOs] [/Overwrite] [/MapByName] [/Domain:<DNSDomainName>]
Example:  CreateMigrationTable.wsf SampleTable.xml /BackupLocation:c:\GPOBackups /OverWrite /MapByName
Example:  CreateMigrationTable.wsf SampleTable.xml /GPO:TestGPO
Example:  CreateMigrationTable.wsf SampleTable.xml /AllGPOs /Overwrite /Domain:example.microsoft.com

CScript.exe CreateMigrationTable.wsf G:\Temp\Prod.xml /BackupLocation:G:\ProdBackup /OverWrite /MapByName

Advertisements