9.7. Importing Settings into a GPO

Problem

You want to import settings from one GPO to another.

Solution

Using a graphical user interface

  1. Open the GPMC snap-in.

  2. In the left pane, expand the Forest container, expand the Domains container, browse to the domain of the target GPO, and expand the Group Policy Objects container.

  3. Right-click on the target GPO and select Import Settings.

  4. Click Next.

  5. Click the Backup button if you want take a backup of the GPO you are importing into.

  6. Click Next.

  7. Select the backup folder location and click Next.

  8. Select the backup instance you want to import from and click Next.

  9. It then will scan to see if there are any security principals or UNC paths in the GPO being imported from. If there are, it will give you an option to modify those settings.

  10. Click Next.

  11. Click Finish.

Using a command-line interface

> importgpo.wsf "<GPOBackupLocation>" "<OrigGPOName>" "<NewGPOName>"

Using VBScript

' This code imports the settings from a GPO that has been backed up into
' an existing GPO.
' ------ SCRIPT CONFIGURATION ------
strGPOImportTo    = "<GPOName>"        ' e.g. Sales GPO
strDomain         = "<DomainDNSName>"  ' e.g. rallencorp.com
strBackupLocation = "<BackupLocation>" ' e.g. c:\GPMC Backups

' GUID representing specific backup
' e.g.{3E53B39B-C29B-44FF-857B-8A84528804FF}
strBackupID       = "<BackupGUID>" ' ------ END CONFIGURATION --------- set objGPM = CreateObject("GPMgmt.GPM") set objGPMConstants = objGPM.GetConstants( ) ' Initialize the Domain object set objGPMDomain = objGPM.GetDomain(strDomain, ...

Get Active Directory Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.