PowerShell Cmdlet of the Day Podcast

Episode 5 – BackupRestoreImport-GPO


Listen Later

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

...more
View all episodesView all episodes
Download on the App Store

PowerShell Cmdlet of the Day PodcastBy Tome Tanasovski

  • 4.2
  • 4.2
  • 4.2
  • 4.2
  • 4.2

4.2

6 ratings