diff --git a/Examples/Example-28-SaveGPO.ps1 b/Examples/Example-28-SaveGPO.ps1 index c00fc51..5c4bd03 100644 --- a/Examples/Example-28-SaveGPO.ps1 +++ b/Examples/Example-28-SaveGPO.ps1 @@ -1,4 +1,3 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force -#Save-GPOZaurrFiles -GPOPath $ENV:USERPROFILE\Desktop\GPOExport -DeleteExisting -Save-GPOZaurrFiles -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPOExportEvotec' #-DeleteExisting \ No newline at end of file +Save-GPOZaurrFiles -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPOExportEvotec' -DeleteExisting -Verbose \ No newline at end of file diff --git a/Examples/Example-29-FindGPO0.ps1 b/Examples/Example-29-FindGPO0.ps1 index 358f7c8..55faac0 100644 --- a/Examples/Example-29-FindGPO0.ps1 +++ b/Examples/Example-29-FindGPO0.ps1 @@ -1,12 +1,22 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force # Asses GPO based on exported data -$Output = Invoke-GPOZaurr -GPOPath $Env:USERPROFILE\Desktop\GPOExport -Verbose +$Output = Invoke-GPOZaurr -GPOPath $Env:USERPROFILE\Desktop\GPOExport_2020.10.12 -Verbose $Output | Format-Table * # Export to Excel -foreach ($Key in $Output.Reports.Keys) { - $Output.Reports[$Key] | ConvertTo-Excel -FilePath $Env:USERPROFILE\Desktop\EFGPOAnalysis.xlsx -ExcelWorkSheetName $Key -AutoFilter -AutoFit -FreezeTopRowFirstColumn +foreach ($Key in $Output.Keys) { + $Output[$Key] | ConvertTo-Excel -FilePath $Env:USERPROFILE\Desktop\EFGPOAnalysis.xlsx -ExcelWorkSheetName $Key -AutoFilter -AutoFit -FreezeTopRowFirstColumn } # Show the Excel -Start-Process "$Env:USERPROFILE\Desktop\EFGPOAnalysis1.xlsx" \ No newline at end of file +Start-Process "$Env:USERPROFILE\Desktop\EFGPOAnalysis.xlsx" + +# Show HTML +New-HTML { + New-HTMLTableOption -DataStore JavaScript + foreach ($Key in $Output.Keys) { + New-HTMLTab -Name $Key { + New-HTMLTable -DataTable $Output[$Key] -Filtering -Title $Key + } + } +} -FilePath $Env:USERPROFILE\Desktop\EFGPOAnalysis.html -ShowHTML -Online \ No newline at end of file diff --git a/Examples/Example-29-FindGPO1.ps1 b/Examples/Example-29-FindGPO1.ps1 index 0ee779f..d8cc24c 100644 --- a/Examples/Example-29-FindGPO1.ps1 +++ b/Examples/Example-29-FindGPO1.ps1 @@ -1,34 +1,22 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force #$Output = Invoke-GPOZaurr -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPODefender' -$Output = Invoke-GPOZaurr -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPOExport' -$Output -return +$Output = Invoke-GPOZaurr -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPOExport' -Type WindowsHelloForBusiness $Output | Format-Table -$Output.Reports | Format-Table -$Output.Reports.WindowsDefenderExploitGuard -#$Output.Reports.RegistrySetting | Format-Table -#$Output.CategoriesFull | Format-Table -<# -$Output.Reports.Policies | Format-Table -$Output.Reports.SecurityOptions | Format-Table -$Output.Reports.PublicKeyPoliciesCertificates | Format-Table -$Output.Reports.PublicKeyPoliciesEnrollmentPolicy | Format-Table -$Output.Reports.PublicKeyPoliciesAuto | Format-Table * -#> - -return +$Output.WindowsDefenderExploitGuard | Format-Table +$Output.Reports.RegistrySetting | Format-Table # Report to Excel of translated reports -foreach ($Key in $Output.Reports.Keys) { - $Output.Reports[$Key] | ConvertTo-Excel -FilePath $Env:USERPROFILE\Desktop\GPOAnalysis.xlsx -ExcelWorkSheetName $Key -AutoFilter -AutoFit -FreezeTopRowFirstColumn +foreach ($Key in $Output.Keys) { + $Output[$Key] | ConvertTo-Excel -FilePath $Env:USERPROFILE\Desktop\GPOAnalysis.xlsx -ExcelWorkSheetName $Key -AutoFilter -AutoFit -FreezeTopRowFirstColumn } # Report to HTML of translated reports New-HTML { - foreach ($Key in $Output.Reports.Keys) { + New-HTMLTableOption -DataStore JavaScript + foreach ($Key in $Output.Keys) { New-HTMLTab -Name $Key { - New-HTMLTable -DataTable $Output.Reports[$Key] -Filtering + New-HTMLTable -DataTable $Output[$Key] -Filtering -Title $Key } } } -FilePath $Env:USERPROFILE\Desktop\GPOAnalysis.html -ShowHTML -Online \ No newline at end of file diff --git a/Examples/Example-29-FindGPO2.ps1 b/Examples/Example-29-FindGPO2.ps1 index 60826d8..7ade81c 100644 --- a/Examples/Example-29-FindGPO2.ps1 +++ b/Examples/Example-29-FindGPO2.ps1 @@ -2,7 +2,7 @@ # This gets the same thing as earlier examples # with a difference where one entry per gpo and all settings for that GPO is stored under settings property. -$Output = Invoke-GPOZaurr -SingleObject +$Output = Invoke-GPOZaurr -SingleObject -Verbose $Output | Format-Table $Output.Reports.RegistrySettings | Format-Table * $Output.Reports.RegistrySettings[0].Settings | Format-Table * \ No newline at end of file diff --git a/Examples/Example-29-FindGPO3.ps1 b/Examples/Example-29-FindGPO3.ps1 index 544d6a5..abce61f 100644 --- a/Examples/Example-29-FindGPO3.ps1 +++ b/Examples/Example-29-FindGPO3.ps1 @@ -1,9 +1,11 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force # Use Save-GPOZaurrFiles -GPOPath $ENV:USERPROFILE\Desktop\GPOExportAudit -$Output = Invoke-GPOZaurr -GPOPath $ENV:USERPROFILE\Desktop\GPOExportAudit -Verbose #-SkipCleanup #-Type PoliciesPrinters, Policies -$Output | Format-Table * +# This will allow you to process offline data more than once +# It's useful for when you want to request different types +$Output = Invoke-GPOZaurr -GPOPath $ENV:USERPROFILE\Desktop\GPOExportAudit -Extended -Verbose +$Output | Format-Table * $Output.Reports | Format-Table # Export to Excel diff --git a/Examples/Example-29-FindGPO4.ps1 b/Examples/Example-29-FindGPO4.ps1 new file mode 100644 index 0000000..1799424 --- /dev/null +++ b/Examples/Example-29-FindGPO4.ps1 @@ -0,0 +1,4 @@ +Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force + +$Output = Invoke-GPOZaurr -Verbose -Type DriveMapping,EventLog +$Output | Format-Table \ No newline at end of file diff --git a/GPOZaurr.psd1 b/GPOZaurr.psd1 index 9bc0e2e..4586fd4 100644 --- a/GPOZaurr.psd1 +++ b/GPOZaurr.psd1 @@ -22,11 +22,11 @@ ModuleName = 'PSSharedGoods' Guid = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe' }, @{ - ModuleVersion = '0.0.97' + ModuleVersion = '0.0.98' ModuleName = 'ADEssentials' Guid = '9fc9fd61-7f11-4f4b-a527-084086f1905f' }, @{ - ModuleVersion = '0.0.111' + ModuleVersion = '0.0.113' ModuleName = 'PSWriteHTML' Guid = 'a7bdf640-f5cb-4acf-9de0-365b322d245c' }, 'CimCmdlets', 'Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Utility')