Compare commits

..

12 Commits

Author SHA1 Message Date
Przemyslaw Klys 65f52058d3 Enhance example scripts with additional functionality
- Added online invocation of Invoke-GPOZaurr for GPOBroken and GPOBrokenLink
- Included return statements for clarity in Example-29 and Example-51
2025-02-23 13:44:07 +01:00
Przemyslaw Klys 170896c0cc Add new ADMX template handling functions and example script 2024-12-02 22:35:29 +01:00
Przemyslaw Klys cd72f79f85 Update changelog 2024-11-20 22:00:49 +01:00
Przemyslaw Klys 8d32cb443e Bump version 2024-11-20 21:50:57 +01:00
Przemyslaw Klys 4f4fddddae Add support for RestrcitedGroups #68 2024-11-20 21:50:02 +01:00
Przemyslaw Klys a374433922 Update changelog 2024-11-20 20:54:25 +01:00
Przemyslaw Klys 96a5e0789e update 2024-11-20 20:53:10 +01:00
Przemyslaw Klys f37887c8bf Bump 2024-11-20 20:40:22 +01:00
Przemyslaw Klys 497438dc1e Try to add some reporting for #67 2024-11-20 20:35:46 +01:00
Przemyslaw Klys 503b82ca02 Update gpo example 2024-10-17 22:30:54 +02:00
Przemyslaw Klys 790b3b97e0 update example 2024-10-17 22:30:41 +02:00
Przemyslaw Klys 07a8c77763 Update changelog 2024-10-17 19:48:27 +02:00
14 changed files with 259 additions and 19 deletions
-2
View File
@@ -1,7 +1,5 @@
Clear-Host
Import-Module "PSPublishModule" -Force
Invoke-ModuleBuild -ModuleName 'GPOZaurr' {
# Usual defaults as per standard module
$Manifest = @{
+26 -4
View File
@@ -1,9 +1,31 @@
# GPOZaurr Release History
## 1.1.6
- Improve HTML reports with `ScrollX`
- Improve HTML reports by hiding some unnesecary columns
- Added `SizeMB` and `Size` to reports around files/GPOs which could help analyze performance issues
## 1.1.8 - 2024.11.20
### What's new
- Added `RestrictedGroups` to GroupAnalysis
**Full Changelog**: https://github.com/EvotecIT/GPOZaurr/compare/v1.1.7...v1.1.8
## 1.1.7 - 2024.11.20
### What's Changed
- Added some additional logging to track down issue
## 1.1.6 - 2024.10.17
### What's Changed
* Improve HTML reports with `ScrollX`
* Improve HTML reports by hiding some unnesecary columns
* Added `SizeMB` and `Size` to reports around files/GPOs which could help analyze performance issues
* Other minor HTML fixes
* Fixed typo "Unfortunetly" -> "Unfortunately" by @davidmwilliams in https://github.com/EvotecIT/GPOZaurr/pull/61
* Minor typo correction "incosistent" -> "inconsistent" by @davidmwilliams in https://github.com/EvotecIT/GPOZaurr/pull/60
* Update Invoke.GPOZaurrDuplicate.ps1 by @SamErde in https://github.com/EvotecIT/GPOZaurr/pull/63
* Fix typo and grammar by @SamErde in https://github.com/EvotecIT/GPOZaurr/pull/64
### New Contributors
* @davidmwilliams made their first contribution in https://github.com/EvotecIT/GPOZaurr/pull/61
* @SamErde made their first contribution in https://github.com/EvotecIT/GPOZaurr/pull/63
**Full Changelog**: https://github.com/EvotecIT/GPOZaurr/compare/v1.1.5...v1.1.6
## 1.1.5 - 2024.07.06
* Added or improved help on all functions. by @neztach in https://github.com/EvotecIT/GPOZaurr/pull/56
+8
View File
@@ -1,5 +1,13 @@
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
#$O = Invoke-GPOZaurrContent -GPOName "Test-RestrictedGroups" -Verbose
#$O
Invoke-GPOZaurr -Online -Type GPOBroken, GPOBrokenLink -Verbose -SplitReports
return
#$Output = Invoke-GPOZaurrContent -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPODefender'
$Output = Invoke-GPOZaurrContent -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPOExport' -Type WindowsHelloForBusiness
$Output | Format-Table
+3 -2
View File
@@ -1,4 +1,5 @@
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
$Files = Get-GPOZaurrFiles -Limited -Signature
$Files | ConvertTo-Excel -OpenWorkBook -FilePath $Env:USERPROFILE\Desktop\GPOTesting.xlsx -ExcelWorkSheetName 'GPO Output' -AutoFilter -AutoFit -FreezeTopRowFirstColumn
$Files = Get-GPOZaurrFiles -Type All -Verbose
#$Files | ConvertTo-Excel -OpenWorkBook -FilePath $Env:USERPROFILE\Desktop\GPOTesting.xlsx -ExcelWorkSheetName 'GPO Output' -AutoFilter -AutoFit -FreezeTopRowFirstColumn
$Files | Format-Table
+1 -1
View File
@@ -27,4 +27,4 @@
#Invoke-GPOZaurr -Online -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Type GPOAnalysis #-SplitReports -Forest test.evotec.pl
Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Type GPOBlockedInheritance -Forest 'ad.evotec.xyz'
Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html # -Verbose #-Type GPOBlockedInheritance -Forest 'ad.evotec.xyz'
@@ -3,6 +3,8 @@
$OUs = Get-GPOZaurrOrganizationalUnit
$Ous | Format-Table
return
Get-GPOZaurrOrganizationalUnit -Verbose -Option Unlink -Exclusions @(
'OU=Groups,OU=Production,DC=ad,DC=evotec,DC=pl'
) | Format-Table
+19
View File
@@ -0,0 +1,19 @@
Import-Module .\GPOZaurr.psd1 -Force
$DirectoryPath = "C:\Support\GitHub\GpoZaurr\Data\ADMXTemplates"
$Paths = @(
[PSCustomObject] @{ Name = "Citrix"; Path = "C:\Program Files (x86)\Citrix\ICA Client\Configuration"; ExportFile = "Citrix" }
[PSCustomObject] @{ Name = "Remote Desktop Manager"; Path = "C:\Program Files\Devolutions\Remote Desktop Manager\Policies" ; ExportFile = "Remote Desktop Manager" }
[PSCustomObject] @{ Name = "Microsoft Windows 2022 Security Baseline"; Path = "C:\Users\przemyslaw.klys\Downloads\GPO\Windows Server 2022 Security Baseline\Windows Server-2022-Security-Baseline-FINAL\Templates" ; ExportFile = "Windows Server 2022 Security Baseline" }
[PSCustomObject] @{ Name = "Microsoft OneDrive"; Path = "C:\Program Files\Microsoft OneDrive\24.216.1027.0003\adm" ; ExportFile = "Microsoft OneDrive" }
[PSCustomObject] @{ Name = "Microsoft PowerShell 7 Core"; Path = "C:\Program Files\PowerShell\7" ; ExportFile = "Microsoft PowerShell 7" }
[PSCustomObject] @{ Name = "Microsoft Windows 11 (24H2) September 2024"; Path = "C:\Program Files (x86)\Microsoft Group Policy\Windows 11 Sep 2024 Update (24H2)" ; ExportFile = "Microsoft Windows11 24H2 September 2024" }
)
foreach ($Path in $Paths) {
$InitializeGPOZaurrTemplateSplat = @{
Path = $Path.Path
Name = $Path.Name
ExportPath = "$DirectoryPath\$($Path.ExportFile).json"
}
$List = Initialize-GPOZaurrTemplate @InitializeGPOZaurrTemplateSplat -Verbose
}
+4 -4
View File
@@ -6,9 +6,9 @@
CompatiblePSEditions = @('Desktop')
Copyright = '(c) 2011 - 2024 Przemyslaw Klys @ Evotec. All rights reserved.'
Description = 'Group Policy Eater is a PowerShell module that aims to gather information about Group Policies but also allows fixing issues that you may find in them.'
FunctionsToExport = @('Add-GPOPermission', 'Add-GPOZaurrPermission', 'Backup-GPOZaurr', 'Clear-GPOZaurrSysvolDFSR', 'ConvertFrom-CSExtension', 'Export-GPOZaurrContent', 'Find-CSExtension', 'Get-GPOZaurr', 'Get-GPOZaurrAD', 'Get-GPOZaurrBackupInformation', 'Get-GPOZaurrBroken', 'Get-GPOZaurrBrokenLink', 'Get-GPOZaurrDictionary', 'Get-GPOZaurrDuplicateObject', 'Get-GPOZaurrFiles', 'Get-GPOZaurrFilesPolicyDefinition', 'Get-GPOZaurrFolders', 'Get-GPOZaurrInheritance', 'Get-GPOZaurrLegacyFiles', 'Get-GPOZaurrLink', 'Get-GPOZaurrLinkSummary', 'Get-GPOZaurrMissingFiles', 'Get-GPOZaurrNetLogon', 'Get-GPOZaurrOrganizationalUnit', 'Get-GPOZaurrOwner', 'Get-GPOZaurrPassword', 'Get-GPOZaurrPermission', 'Get-GPOZaurrPermissionAnalysis', 'Get-GPOZaurrPermissionConsistency', 'Get-GPOZaurrPermissionIssue', 'Get-GPOZaurrPermissionRoot', 'Get-GPOZaurrPermissionSummary', 'Get-GPOZaurrRedirect', 'Get-GPOZaurrSysvolDFSR', 'Get-GPOZaurrUpdates', 'Get-GPOZaurrWMI', 'Invoke-GPOZaurr', 'Invoke-GPOZaurrContent', 'Invoke-GPOZaurrPermission', 'Invoke-GPOZaurrSupport', 'New-GPOZaurrWMI', 'Optimize-GPOZaurr', 'Remove-GPOPermission', 'Remove-GPOZaurr', 'Remove-GPOZaurrBroken', 'Remove-GPOZaurrDuplicateObject', 'Remove-GPOZaurrFolders', 'Remove-GPOZaurrLegacyFiles', 'Remove-GPOZaurrLinkEmptyOU', 'Remove-GPOZaurrPermission', 'Remove-GPOZaurrWMI', 'Repair-GPOZaurrBrokenLink', 'Repair-GPOZaurrNetLogonOwner', 'Repair-GPOZaurrPermission', 'Repair-GPOZaurrPermissionConsistency', 'Restore-GPOZaurr', 'Save-GPOZaurrFiles', 'Set-GPOOwner', 'Set-GPOZaurrOwner', 'Set-GPOZaurrStatus', 'Skip-GroupPolicy')
FunctionsToExport = @('Add-GPOPermission', 'Add-GPOZaurrPermission', 'Backup-GPOZaurr', 'Clear-GPOZaurrSysvolDFSR', 'ConvertFrom-CSExtension', 'Export-GPOZaurrContent', 'Find-CSExtension', 'Get-GPOZaurr', 'Get-GPOZaurrAD', 'Get-GPOZaurrTemplates', 'Get-GPOZaurrBackupInformation', 'Get-GPOZaurrBroken', 'Get-GPOZaurrBrokenLink', 'Get-GPOZaurrDictionary', 'Get-GPOZaurrDuplicateObject', 'Get-GPOZaurrFiles', 'Get-GPOZaurrFilesPolicyDefinition', 'Get-GPOZaurrFolders', 'Get-GPOZaurrInheritance', 'Get-GPOZaurrLegacyFiles', 'Get-GPOZaurrLink', 'Get-GPOZaurrLinkSummary', 'Get-GPOZaurrMissingFiles', 'Get-GPOZaurrNetLogon', 'Get-GPOZaurrOrganizationalUnit', 'Get-GPOZaurrOwner', 'Get-GPOZaurrPassword', 'Get-GPOZaurrPermission', 'Get-GPOZaurrPermissionAnalysis', 'Get-GPOZaurrPermissionConsistency', 'Get-GPOZaurrPermissionIssue', 'Get-GPOZaurrPermissionRoot', 'Get-GPOZaurrPermissionSummary', 'Get-GPOZaurrRedirect', 'Get-GPOZaurrSysvolDFSR', 'Get-GPOZaurrUpdates', 'Get-GPOZaurrWMI', 'Initialize-GPOZaurrTemplate', 'Invoke-GPOZaurr', 'Invoke-GPOZaurrContent', 'Invoke-GPOZaurrPermission', 'Invoke-GPOZaurrSupport', 'New-GPOZaurrWMI', 'Optimize-GPOZaurr', 'Remove-GPOPermission', 'Remove-GPOZaurr', 'Remove-GPOZaurrBroken', 'Remove-GPOZaurrDuplicateObject', 'Remove-GPOZaurrFolders', 'Remove-GPOZaurrLegacyFiles', 'Remove-GPOZaurrLinkEmptyOU', 'Remove-GPOZaurrPermission', 'Remove-GPOZaurrWMI', 'Repair-GPOZaurrBrokenLink', 'Repair-GPOZaurrNetLogonOwner', 'Repair-GPOZaurrPermission', 'Repair-GPOZaurrPermissionConsistency', 'Restore-GPOZaurr', 'Save-GPOZaurrFiles', 'Set-GPOOwner', 'Set-GPOZaurrOwner', 'Set-GPOZaurrStatus', 'Skip-GroupPolicy')
GUID = 'f7d4c9e4-0298-4f51-ad77-e8e3febebbde'
ModuleVersion = '1.1.6'
ModuleVersion = '1.1.9'
PowerShellVersion = '5.1'
PrivateData = @{
PSData = @{
@@ -24,11 +24,11 @@
}, @{
Guid = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe'
ModuleName = 'PSSharedGoods'
ModuleVersion = '0.0.297'
ModuleVersion = '0.0.300'
}, @{
Guid = '9fc9fd61-7f11-4f4b-a527-084086f1905f'
ModuleName = 'ADEssentials'
ModuleVersion = '0.0.221'
ModuleVersion = '0.0.226'
}, @{
Guid = 'a7bdf640-f5cb-4acf-9de0-365b322d245c'
ModuleName = 'PSWriteHTML'
+77
View File
@@ -0,0 +1,77 @@
function ConvertTo-XMLRestrictedGroups {
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
[switch] $SingleObject
)
if ($SingleObject) {
$CreateGPO = [ordered]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
#GpoCategory = $GPOEntry.GpoCategory
#GpoSettings = $GPOEntry.GpoSettings
Count = 0
Settings = $null
}
[Array] $CreateGPO['Settings'] = foreach ($Script in $GPO.DataSet) {
$Members = foreach ($Member in $Group.Member) {
if ($($Member.SID.'#text')) {
"$($Member.Name.'#text') ($($Member.SID.'#text'))"
} else {
$Member.Name.'#text'
}
}
$MemberOf = foreach ($Member in $Group.MemberOf) {
if ($($Member.SID.'#text')) {
"$($Member.Name.'#text') ($($Member.SID.'#text'))"
} else {
$Member.Name.'#text'
}
}
[PSCustomObject]@{
GroupName = $Group.GroupName.Name
GroupSID = $Group.GroupName.SID.'#text'
Members = $Members -join ', '
MembersOf = $MemberOf -join ', '
}
}
$CreateGPO['DataCount'] = $CreateGPO['Settings'].Count
$CreateGPO['Linked'] = $GPO.Linked
$CreateGPO['LinksCount'] = $GPO.LinksCount
$CreateGPO['Links'] = $GPO.Links
[PSCustomObject] $CreateGPO
} else {
foreach ($Group in $GPO.DataSet) {
$Members = foreach ($Member in $Group.Member) {
if ($($Member.SID.'#text')) {
"$($Member.Name.'#text') ($($Member.SID.'#text'))"
} else {
$Member.Name.'#text'
}
}
$MemberOf = foreach ($Member in $Group.MemberOf) {
if ($($Member.SID.'#text')) {
"$($Member.Name.'#text') ($($Member.SID.'#text'))"
} else {
$Member.Name.'#text'
}
}
$CreateGPO = [ordered]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
GroupName = $Group.GroupName.Name.'#text'
GroupSID = $Group.GroupName.SID.'#text'
Members = $Members -join ', '
MembersOf = $MemberOf -join ', '
}
$CreateGPO['Linked'] = $GPO.Linked
$CreateGPO['LinksCount'] = $GPO.LinksCount
$CreateGPO['Links'] = $GPO.Links
[PSCustomObject] $CreateGPO
}
}
}
+16 -1
View File
@@ -380,7 +380,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'FSLogix' -SingleObject
}
}
Firefox = @{
Firefox = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -974,6 +974,21 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Remote Desktop Services*' -SingleObject
}
}
RestrictedGroups = @{
Types = @(
@{
Category = 'SecuritySettings'
Settings = 'RestrictedGroups'
}
)
GPOPath = 'Policies -> Windows Settings -> Security Settings -> Restricted Groups'
Code = {
ConvertTo-XMLRestrictedGroups -GPO $GPO
}
CodeSingle = {
ConvertTo-XMLRestrictedGroups -GPO $GPO -SingleObject
}
}
RSSFeeds = @{
Types = @(
@{
+17
View File
@@ -0,0 +1,17 @@
function Get-GPOZaurrTemplates {
[CmdletBinding()]
param(
)
$SysvolADMXPath = "\\$env:USERDNSDOMAIN\SYSVOL\$env:USERDNSDOMAIN\Policies\PolicyDefinitions"
Get-ChildItem -Path $SysvolADMXPath -Filter "*.admx" -Recurse -File | ForEach-Object {
[PSCustomObject]@{
Name = $_.Name
Path = $_.FullName
Size = $_.Length
LastWriteTime = $_.LastWriteTime
}
}
}
+8 -3
View File
@@ -51,7 +51,7 @@
foreach ($Domain in $ForestInformation.Domains) {
Write-Verbose "Get-GPOZaurrOrganizationalUnit - Processing $($Domain)"
$CountTop = 0
$TopOrganizationalUnits = Get-ADOrganizationalUnit -Filter * -Properties LinkedGroupPolicyObjects, DistinguishedName, ntSecurityDescriptor -Server $ForestInformation['QueryServers'][$Domain]['hostname'][0] -SearchScope OneLevel
[Array] $TopOrganizationalUnits = Get-ADOrganizationalUnit -Filter * -Properties LinkedGroupPolicyObjects, DistinguishedName, ntSecurityDescriptor -Server $ForestInformation['QueryServers'][$Domain]['hostname'][0] -SearchScope OneLevel
foreach ($TopOU in $TopOrganizationalUnits) {
$CountTop++
Write-Verbose "Get-GPOZaurrOrganizationalUnit - Processing $($Domain) / $($TOPOU.DistinguishedName) [$CountTop/$($TopOrganizationalUnits.Count)]"
@@ -75,7 +75,7 @@
}
# cache children OUs
$OUs = Get-ADOrganizationalUnit -SearchScope Subtree -SearchBase $TopOU.DistinguishedName -Server $ForestInformation['QueryServers'][$Domain]['hostname'][0] -Properties LinkedGroupPolicyObjects, DistinguishedName -Filter *
[Array] $OUs = Get-ADOrganizationalUnit -SearchScope Subtree -SearchBase $TopOU.DistinguishedName -Server $ForestInformation['QueryServers'][$Domain]['hostname'][0] -Properties LinkedGroupPolicyObjects, DistinguishedName -Filter *
Write-Verbose "Get-GPOZaurrOrganizationalUnit - Processing $($Domain) / $($TOPOU.DistinguishedName) [$CountTop/$($TopOrganizationalUnits.Count)], found $($OUs.Count) OU's to process."
foreach ($OU in $OUs) {
if (-not $CachedOu[$OU.DistinguishedName]) {
@@ -103,8 +103,13 @@
Write-Verbose "Get-GPOZaurrOrganizationalUnit - Processing $($Domain) / $($TOPOU.DistinguishedName) [$CountTop/$($TopOrganizationalUnits.Count)], found $($ObjectsInOu.Count) objects to process."
foreach ($Object in $ObjectsInOu) {
$Place = ConvertFrom-DistinguishedName -ToOrganizationalUnit -DistinguishedName $Object.DistinguishedName
$AllOUs = ConvertFrom-DistinguishedName -ToMultipleOrganizationalUnit -IncludeParent -DistinguishedName $Place
[Array] $AllOUs = ConvertFrom-DistinguishedName -ToMultipleOrganizationalUnit -IncludeParent -DistinguishedName $Place
foreach ($OU in $AllOUs) {
if (-not $CachedOu[$OU]) {
Write-Warning "Get-GPOZaurrOrganizationalUnit - Object $($Object.DistinguishedName) is in OU $($OU) but it's not in cache. This should not happen. Please report this issue."
Write-Warning "Get-GPOZaurrOrganizationalUnit - Debug information: Place: $($Place), AllOUs: $($AllOUs.Count)"
continue
}
if ($OU -eq $Place) {
$CachedOu[$OU]['Objects'][$Object.DistinguishedName] = $Object
$CachedOu[$OU]['ObjectsClasses'][$Object.ObjectClass] = ''
+72
View File
@@ -0,0 +1,72 @@
function Initialize-GPOZaurrTemplate {
[CmdletBinding()]
param(
[Parameter(Mandatory)][string] $Name,
[Parameter(Mandatory)][string] $Path,
[string] $ExportPath
)
$Files = Get-ChildItem -Path $Path -Filter "*.admx" -Recurse -File
$TotalFiles = $Files.Count
$ProgressIncrement = [math]::Ceiling($TotalFiles / 10)
$CurrentProgress = 0
$FullList = foreach ($File in $Files) {
$CurrentProgress++
if ($CurrentProgress % $ProgressIncrement -eq 0) {
Write-Verbose ("Initialize-GPOZaurrTemplate - Processing $Name, template file {0} of {1} ({2}%)" -f $CurrentProgress, $TotalFiles, [math]::Round(($CurrentProgress / $TotalFiles) * 100))
}
$HashInformation = Get-FileHash -LiteralPath $File.FullName
$Directories = Get-ChildItem -Path $File.DirectoryName -Directory
$Languages = [ordered] @{}
foreach ($Directory in $Directories) {
$LanguageFile = [io.path]::Combine($Directory.FullName, $File.BaseName + ".adml")
$Item = Get-Item -Path $LanguageFile -ErrorAction SilentlyContinue
if (Test-Path -Path $LanguageFile) {
$HashInformation = Get-FileHash -LiteralPath $LanguageFile
$Languages[$Directory.Name] = [PSCustomObject]@{
Name = $Directory.Name
Hash = $HashInformation.Hash
Algorithm = $HashInformation.Algorithm
Size = $Item.Length
CreationTimeUtc = $Item.CreationTimeUtc
LastWriteTimeUtc = $Item.LastWriteTimeUtc
}
}
}
[PSCustomObject] @{
Name = $File.Name
Hash = $HashInformation.Hash
Algorithm = $HashInformation.Algorithm
Size = $File.Length
LanguagesAvailable = $Languages.Keys
LanguagesCount = $Languages.Keys.Count
CreationTimeUtc = $File.CreationTimeUtc
LastWriteTimeUtc = $File.LastWriteTimeUtc
LanguageFile = $Languages
}
}
$OutputObject = [PSCustomObject] @{
Name = $Name
Path = $Path
Templates = $FullList
}
if ($ExportPath) {
if ($ExportPath.EndsWith('.xml')) {
$ExportType = 'XML'
} elseif ($ExportPath.EndsWith('.json')) {
$ExportType = 'JSON'
} else {
$ExportType = 'XML'
}
if ($ExportType -eq 'XML') {
$OutputObject | Export-Clixml -Path $ExportPath -ErrorAction Stop
} elseif ($ExportType -eq 'JSON') {
$OutputObject | ConvertTo-Json -Depth 10 | Set-Content -Path $ExportPath -ErrorAction Stop
} else {
Write-Warning "ExportType $ExportType is not supported. Exporting to XML."
}
}
$OutputObject
}
+6 -2
View File
@@ -156,13 +156,17 @@
Get-GPOZaurrAD -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation -GPOName $Name
}
foreach ($GUID in $GPOGUID) {
Get-GPOZaurrAD -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation -GPOGUID $GUID
Get-GPOZaurrAD -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation -GPOGuid $GUID
}
)
} else {
Write-Verbose "Invoke-GPOZaurrContent - Query AD for GPOs"
[Array] $GPOs = Get-GPOZaurrAD -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation
}
if ($GPOs.Count -eq 0) {
Write-Warning "Invoke-GPOZaurrContent - No GPOs found. Exiting."
return
}
# This caches single reports.
$TemporaryCachedSingleReports = [ordered] @{}
$TemporaryCachedSingleReports['ReportsSingle'] = [ordered] @{}
@@ -171,7 +175,7 @@
$Output['Reports'] = [ordered] @{}
$Output['CategoriesFull'] = [ordered] @{}
$ForestInformation = Get-WinADForestDetails -PreferWritable -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation
$ForestInformation = Get-WinADForestDetails -PreferWritable -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation
Write-Verbose "Invoke-GPOZaurrContent - Loading GPO Report to Categories"
$CountGPO = 0