From 34c55c8482b2b68e7aa214e6090bfa158688210d Mon Sep 17 00:00:00 2001 From: Przemyslaw Klys Date: Sun, 2 Aug 2020 00:31:20 +0200 Subject: [PATCH] Example update --- Examples/Example-29-FindGPO3.ps1 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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