diff --git a/Examples/Example-29-FindGPO3.ps1 b/Examples/Example-29-FindGPO3.ps1 index 70e043f..544d6a5 100644 --- a/Examples/Example-29-FindGPO3.ps1 +++ b/Examples/Example-29-FindGPO3.ps1 @@ -1,9 +1,13 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force # Use Save-GPOZaurrFiles -GPOPath $ENV:USERPROFILE\Desktop\GPOExportAudit -$Output = Invoke-GPOZaurr -GPOPath $ENV:USERPROFILE\Desktop\GPOExportAudit # -NoTranslation +$Output = Invoke-GPOZaurr -GPOPath $ENV:USERPROFILE\Desktop\GPOExportAudit -Verbose #-SkipCleanup #-Type PoliciesPrinters, Policies $Output | Format-Table * $Output.Reports | Format-Table -#$Output.Reports.LAPS | Format-Table * -$Output.Reports.LithnetFilter | Format-List * \ No newline at end of file + +# Export to Excel +foreach ($Key in $Output.Reports.Keys) { + $Output.Reports[$Key] | ConvertTo-Excel -FilePath $Env:USERPROFILE\Desktop\GPOAnalysis.xlsx -ExcelWorkSheetName $Key -AutoFilter -AutoFit -FreezeTopRowFirstColumn +} +Start-Process "$Env:USERPROFILE\Desktop\GPOAnalysis.xlsx" \ No newline at end of file