mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-08-25 01:36:58 +00:00
Update
This commit is contained in:
@@ -50,7 +50,9 @@
|
||||
|
||||
[Parameter(ParameterSetName = 'Default')]
|
||||
[Parameter(ParameterSetName = 'Local')]
|
||||
[switch] $SkipCleanup
|
||||
[switch] $SkipCleanup,
|
||||
|
||||
[switch] $Extended
|
||||
)
|
||||
if ($Type.Count -eq 0) {
|
||||
$Type = $Script:GPODitionary.Keys
|
||||
@@ -219,9 +221,18 @@
|
||||
#$Output['PoliciesTotal'] = $Output.Reports.Policies.PolicyCategory | Group-Object | Select-Object Name, Count | Sort-Object -Property Count -Descending
|
||||
|
||||
if (-not $SkipCleanup) {
|
||||
Write-Verbose "Invoke-GPOZaurr - Cleaning up output"
|
||||
Remove-EmptyValue -Hashtable $Output -Recursive
|
||||
}
|
||||
return $Output
|
||||
if ($Extended) {
|
||||
$Output
|
||||
} else {
|
||||
if ($Output.Reports) {
|
||||
$Output.Reports
|
||||
} else {
|
||||
Write-Warning "Invoke-GPOZaurr - There was no data output for requested types."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[scriptblock] $SourcesAutoCompleter = {
|
||||
|
||||
@@ -17,8 +17,12 @@
|
||||
}
|
||||
}
|
||||
$null = New-Item -ItemType Directory -Path $GPOPath -Force
|
||||
Write-Verbose "Save-GPOZaurrFiles - Gathering GPO data"
|
||||
$Count = 0
|
||||
$GPOs = Get-GPOZaurrAD -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation
|
||||
foreach ($GPO in $GPOS) {
|
||||
$Count++
|
||||
Write-Verbose "Save-GPOZaurrFiles - Processing GPO ($Count/$($GPOS.Count)) $($GPO.DomainName) | $($GPO.DisplayName)"
|
||||
$XMLContent = Get-GPOReport -ID $GPO.Guid -ReportType XML -Domain $GPO.DomainName
|
||||
$GPODOmainFolder = [io.path]::Combine($GPOPath, $GPO.DomainName)
|
||||
if (-not (Test-Path -Path $GPODOmainFolder)) {
|
||||
|
||||
Reference in New Issue
Block a user