DiscoverPowerShell Cmdlet of the Day PodcastEpisode 5 – BackupRestoreImport-GPO
Episode 5 – BackupRestoreImport-GPO

Episode 5 – BackupRestoreImport-GPO

Update: 2011-09-01
Share

Description

Download the MP3 Podcast


In this episode we look at how you can Backup, Restore, and Import Group Policy Objects using Windows PowerShell and the cmdlets that come with the Group Policy module in the latest version of RSAT and the GPMC.


$dir = '\\server1\gpobackups'

# Backups
Get-GPO -All |Backup-GPO -Path $dir
Get-GPO remoting |Backup-GPO -Path $dir

#Restore
Restore-GPO -Path $dir -All
Restore-GPO -Path $dir -Name remoting

# Restore a GPO from a specific backup
$id = '00003D27-F9E6-4C59-BF69-938E5AE43D05'
Restore-GPO -Path $dir -BackupId $id

# Create a new GPO named remoting2
Import-GPO -Path $dir -BackupGpoName remoting -TargetName remoting2 -CreateIfNeeded

Brought to you by The Windows PowerShell Bible 2.0 and PowerShellGroup.Org

Comments 
loading
00:00
00:00
1.0x

0.5x

0.8x

1.0x

1.25x

1.5x

2.0x

3.0x

Sleep Timer

Off

End of Episode

5 Minutes

10 Minutes

15 Minutes

30 Minutes

45 Minutes

60 Minutes

120 Minutes

Episode 5 – BackupRestoreImport-GPO

Episode 5 – BackupRestoreImport-GPO

Tome Tanasovski