Skip to content

Instantly share code, notes, and snippets.

@ddhahn
Created February 1, 2013 16:43
Show Gist options
  • Save ddhahn/4692490 to your computer and use it in GitHub Desktop.
Save ddhahn/4692490 to your computer and use it in GitHub Desktop.
Restore GPOs from file
#create new GPO's named in the file, then import the right gpo into that policy
$gpos = get-content("c:\temp\gpos.txt")
foreach ($gpo in $gpos) {
import-gpo -backupgponame "$gpo" -targetname "restored - $gpo" -path "c:\temp\backups"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment