Skip to main content

GPO Import Process

Summary

Imports a target GPO and optionally links it to the root of the domain.

Time Saved by Automation: 10 Minutes

Sample Run

Sample Run

Dependencies

  • The target ZIP must be named identically to the GPO to be imported.
    For example, if making a backup of the GPO "Enable Auditing," the ZIP file should be named "Enabled Auditing.zip."
  • The target ZIP file must be placed in the following directory in the LTShare:
    C:/LTShare/Transfer/GPOs/GPOName.zip
  • The target ZIP file must be in the following format:
    [GPOName.zip](http://gponame.zip)

Variables

Global Parameters

NameExampleRequiredDescription
TempDirC:/tempTrueThe top-level directory to store files for this process on the target machine. It will be created if it does not exist.

User Parameters

NameExampleRequiredDescription
GPONameGPO NameTrueThe name of the GPO to import and also the base name of the backup ZIP file to download. You can use the "Available GPOs for Deployment" dataview to see possible options for this parameter.
LinkToRoot1FalseIf this is set to 1, then the script will link the created GPO to the root of the domain; otherwise, no link will be created.

Process

  • The script runs a subscript to verify the location credentials. It will exit on error if it cannot verify the credentials.
  • Creates the @TempDir@ directory if it does not exist and downloads the ZIP file.
  • Executes the PowerShell as the location Admin.
  • If the GPO fails to be created or fails to link (if required), then an applicable error will be thrown.

Output

  • Script log