$path = "C:\Temp"
New-Item -ItemType Directory -Path $path -Force
Get-GPO -All | ForEach-Object {
$name = $_.DisplayName.Replace(" ", "") Get-GPOReport -Guid $.Id -ReportType Html -Path "$path\$name.html"
}$path = "C:\Temp"
New-Item -ItemType Directory -Path $path -Force
Get-GPO -All | ForEach-Object {
$name = $_.DisplayName.Replace(" ", "") Get-GPOReport -Guid $.Id -ReportType Html -Path "$path\$name.html"
}