
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 […]