Backup GPOs basing on GPO DisplayName

$invalidChars = ‘:\\/’ + [RegEx]::Escape(-join [IO.Path]::InvalidPathChars)

$backupDir = ‘C:\temp\backup’
Get-GPO -All -Domain <DOmain Name>| ForEach-Object {
$name = $_.DisplayName -replace “[$invalidChars]”, ‘_’
$gpoDir = Join-Path $backupDir -ChildPath $name
New-Item $gpoDir -Type Directory | Out-Null
Backup-GPO -Domain <DOmain Name> -Guid $_.Id -Path $gpoDir
}

22 Comments

  1. you are really a good webmaster. The site loading speed is incredible. It seems that you’re doing any unique trick. Furthermore, The contents are masterwork. you’ve done a wonderful job on this topic!

  2. naturally like your website but you need to check the spelling on several of your posts. Many of them are rife with spelling problems and I find it very troublesome to tell the reality then again I will certainly come again again.

  3. I cherished up to you’ll obtain performed proper here. The comic strip is tasteful, your authored material stylish. nevertheless, you command get bought an nervousness over that you wish be delivering the following. ill undoubtedly come further in the past again as exactly the same nearly a lot often inside case you protect this increase.

  4. I have been browsing on-line more than three hours lately, but I by no means found any fascinating article like yours. It’s pretty value enough for me. Personally, if all webmasters and bloggers made just right content as you did, the internet can be much more helpful than ever before.

  5. The next time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my choice to read, but I actually thought youd have something interesting to say. All I hear is a bunch of whining about something that you could fix if you werent too busy looking for attention.

Leave a Reply

Your email address will not be published.