Created
February 1, 2013 16:42
-
-
Save ddhahn/4692482 to your computer and use it in GitHub Desktop.
Backup GPO's that are named in a file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Backup GPO's who's names are in a file | |
import-module grouppolicy | |
$gpofile = "C:\temp\gpos.txt" | |
$gpos = get-content($gpofile) | |
foreach($gpo in $gpos) { | |
$gpobackup = backup-gpo $gpo -path "c:\temp\gpobackup" | |
write-host "Backed up $gpo" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment