Compare commits

..

45 Commits

Author SHA1 Message Date
Przemyslaw Klys 6718b35aaf Comment out self-import in module build configuration 2024-12-02 23:01:46 +01:00
Przemyslaw Klys 808af75ab9 Update module dependencies and version numbers 2024-12-02 22:57:14 +01:00
Przemyslaw Klys 6745e547a4 Update changelog 2024-12-02 22:54:24 +01:00
Przemyslaw Klys 642c4844a5 Add default file path handling for HTML report generation, fixes #58 2024-12-02 22:53:34 +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
Przemyslaw Klys 9dfc4d01c3 Bump 2024-10-17 19:45:36 +02:00
Przemyslaw Klys a59a418e98 Update changelog 2024-10-17 19:42:28 +02:00
Przemyslaw Klys 5a1f7da921 Merge branch 'master' of https://github.com/EvotecIT/GPOZaurr 2024-10-17 19:36:27 +02:00
Przemyslaw Klys 8bdb157330 Update text 2024-10-17 19:36:20 +02:00
Przemyslaw Klys 096c6354d7 Add evotec 2024-10-17 19:36:04 +02:00
Przemyslaw Klys a3427496e9 Add scrollx 2024-10-17 19:35:53 +02:00
Przemyslaw Klys 9fb76d701f Add size 2024-10-17 19:34:54 +02:00
Przemyslaw Klys 7b4d31781c Add size 2024-10-17 19:34:45 +02:00
Przemyslaw Klys 21bcf2c3a6 Improve conditions 2024-10-17 19:34:16 +02:00
Przemyslaw Klys 46947e0ee9 Improve output to html 2024-10-17 19:34:06 +02:00
Przemyslaw Klys 12d4dfc634 Optimize output 2024-10-17 19:33:48 +02:00
Przemyslaw Klys 44be1f8d97 Add more conditions 2024-10-17 19:33:41 +02:00
Przemyslaw Klys 864d2cd516 Added scrollx 2024-10-17 19:33:00 +02:00
Przemyslaw Klys 0db67a6d70 Add file size 2024-10-17 19:30:15 +02:00
Przemysław Kłys 189401d62b Merge pull request #64 from SamErde/master 2024-09-30 22:04:19 +02:00
Sam Erde 212f59dd38 Merge branch 'EvotecIT:master' into master 2024-09-30 14:24:24 -04:00
Sam Erde 7b80dc2d8e Update Invoke.GPOZaurrMissingFiles.ps1
Fix typo. Small grammatical improvements in punctuation and readability.
2024-09-30 14:23:48 -04:00
Przemysław Kłys 5afa032042 Merge pull request #63 from SamErde/grammar-patch-1
Update Invoke.GPOZaurrDuplicate.ps1
2024-09-30 19:59:16 +02:00
Sam Erde 00b8586edc Update Invoke.GPOZaurrDuplicate.ps1
Minor grammatical fixes to summary text.
2024-09-30 13:56:36 -04:00
Przemyslaw Klys 08b07de729 Merge branch 'master' of https://github.com/EvotecIT/GPOZaurr 2024-08-24 11:01:10 +02:00
Przemyslaw Klys 3b04efcbc8 Commit examples 2024-08-24 11:01:02 +02:00
Przemysław Kłys 051544f353 Merge pull request #60 from davidmwilliams/patch-1
Minor typo correction "incosistent" -> "inconsistent"
2024-08-21 07:56:49 +02:00
Przemysław Kłys 307dec14df Merge pull request #61 from davidmwilliams/patch-2
Fixed typo "Unfortunetly" -> "Unfortunately"
2024-08-21 07:56:35 +02:00
David M Williams 9ec8f5128b Fixed typo "Unfortunetly" -> "Unfortunately" 2024-08-21 12:32:12 +10:00
David M Williams 7b68b12b02 Minor typo correction "incosistent" -> "inconsistent" 2024-08-21 12:21:46 +10:00
Przemyslaw Klys 029225a65c Update changelog 2024-07-06 09:08:34 +02:00
Przemyslaw Klys ae2a0bd84c Bump versions 2024-07-06 09:06:37 +02:00
Przemyslaw Klys cb473ae5fa Update docs 2024-07-06 08:47:15 +02:00
Przemyslaw Klys e156ef9a24 Small improvements to docs 2024-07-06 08:40:11 +02:00
Przemysław Kłys 40cd4dc8ad Merge pull request #56 from neztach/master
Added or improved help on all functions.
2024-07-06 08:07:05 +02:00
neztach 92f3fcb692 Added or improved help on all functions. 2024-07-05 13:00:03 -05:00
134 changed files with 3379 additions and 131 deletions
+3 -4
View File
@@ -1,7 +1,5 @@
Clear-Host
Import-Module "PSPublishModule" -Force
Invoke-ModuleBuild -ModuleName 'GPOZaurr' {
# Usual defaults as per standard module
$Manifest = @{
@@ -29,7 +27,8 @@ Invoke-ModuleBuild -ModuleName 'GPOZaurr' {
}
New-ConfigurationManifest @Manifest
New-ConfigurationModule -Type RequiredModule -Name 'PSWriteColor', 'PSSharedGoods', 'ADEssentials', 'PSWriteHTML' -Guid Auto -Version Latest
New-ConfigurationModule -Type RequiredModule -Name 'PSWriteColor', 'PSSharedGoods', 'ADEssentials' -Guid Auto -Version Latest
New-ConfigurationModule -Type RequiredModule -Name "PSWriteHTML" -Guid Auto -Version "1.27.0"
#New-ConfigurationModule -Type ExternalModule -Name 'Microsoft.PowerShell.Utility', 'Microsoft.PowerShell.Management','Microsoft.PowerShell.Security'
New-ConfigurationModule -Type ApprovedModule -Name 'PSSharedGoods', 'PSWriteColor', 'Connectimo', 'PSUnifi', 'PSWebToolbox', 'PSMyPassword', 'ADEssentials'
@@ -211,7 +210,7 @@ Invoke-ModuleBuild -ModuleName 'GPOZaurr' {
# configuration for documentation, at the same time it enables documentation processing
New-ConfigurationDocumentation -Enable:$false -StartClean -UpdateWhenNew -PathReadme 'Docs\Readme.md' -Path 'Docs'
New-ConfigurationImportModule -ImportSelf
#New-ConfigurationImportModule -ImportSelf
New-ConfigurationBuild -Enable:$true -SignModule -MergeModuleOnBuild -MergeFunctionsFromApprovedModules -CertificateThumbprint '483292C9E317AA13B07BB7A96AE9D1A5ED9E7703'
+36
View File
@@ -1,5 +1,41 @@
# GPOZaurr Release History
## 1.1.9 - 2024.12.02
- Fixes `Invoke-GPOZaurr` when using SplitReports without path [#58](https://github.com/EvotecIT/GPOZaurr/issues/58)
## 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
### New Contributors
* @neztach made their first contribution in https://github.com/EvotecIT/GPOZaurr/pull/56
## 1.1.4 - 2024.06.11
- Small improvements & fixes
+1 -1
View File
@@ -3,5 +3,5 @@
#$GPOS = Get-GPOZaurr -GPOName 'TEST | Office Configuration'
#$GPOS | Format-Table -AutoSize *
$GPOS = Get-GPOZaurr -GPOName 'New Group Policy Object3'
$GPOS = Get-GPOZaurr -GPOName 'TEST | EmptyWITHGPF'
$GPOS | Format-Table -AutoSize *
+10 -1
View File
@@ -2,7 +2,16 @@
# 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-GPOZaurrContent -Verbose #-SingleObject -Verbose
#$Output = Invoke-GPOZaurrContent -Verbose #-SingleObject -Verbose
#$Output | Format-Table
$Output = Invoke-GPOZaurrContent -Verbose -GPOName 'Default Domain Policy'
$Output | Format-Table
Invoke-GPOZaurr -Type GPOAnalysis -GPOName 'Default Domain Policy' -Verbose
return
$Output.Reports.RegistrySettings | Format-Table *
$Output.Reports.RegistrySettings[0].Settings | 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
+24 -13
View File
@@ -1,19 +1,30 @@
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
Invoke-GPOZaurr -Type GPOOrganizationalUnit -Online -FilePath $PSScriptRoot\Reports\GPOZaurr.html
# # Shows how to use exclusions for GPOList (different way)
# Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Type GPOList -Online -Exclusions {
# Skip-GroupPolicy -Name 'de14_usr_std'
# Skip-GroupPolicy -Name 'ALL | Enable RDP' -DomaiName 'ad.evotec.xyz'
# '01446204-d2b5-4c9a-a539-5d0f64f27fbc'
# '{01cef2e1-ea5c-4c4a-bd43-94d89d8a7810}'
# }
# Shows how to use exclusions (supported only in GPOBlockedInheritance)
Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Type GPOBlockedInheritance -Online -Exclusions @(
'OU=Test,OU=ITR02,DC=ad,DC=evotec,DC=xyz'
)
# Invoke-GPOZaurr -Type GPOOrganizationalUnit -Online -FilePath $PSScriptRoot\Reports\GPOZaurr.html
# different approach to query multiple reports or just one
Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -PassThru -Type GPOConsistency, GPOList, GPODuplicates, GPOBroken, GPOOwners, NetLogonOwners, GPOPermissionsRead, GPOPermissionsAdministrative,GPOPermissionsUnknown
# # Shows how to use exclusions (supported only in GPOBlockedInheritance)
# Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Type GPOBlockedInheritance -Online -Exclusions @(
# 'OU=Test,OU=ITR02,DC=ad,DC=evotec,DC=xyz'
# )
Invoke-GPOZaurr -Type GPOOwners -Online -FilePath $PSScriptRoot\Reports\GPOZaurr.html
# # different approach to query multiple reports or just one
# Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -PassThru -Type GPOConsistency, GPOList, GPODuplicates, GPOBroken, GPOOwners, NetLogonOwners, GPOPermissionsRead, GPOPermissionsAdministrative, GPOPermissionsUnknown
# Shows how to use exclusions for GPOList (different way)
Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Type GPOList -Online -Exclusions {
Skip-GroupPolicy -Name 'de14_usr_std'
Skip-GroupPolicy -Name 'ALL | Enable RDP' -DomaiName 'ad.evotec.xyz'
}
#Invoke-GPOZaurr -Type GPOOwners,GPOConsistency -Online -FilePath $PSScriptRoot\Reports\GPOZaurr.html
#Invoke-GPOZaurr -Type GPOOwners -Online -FilePath $PSScriptRoot\Reports\GPOZaurr.html
##Invoke-GPOZaurr -Type GPOOwners,GPOConsistency -Online -FilePath $PSScriptRoot\Reports\GPOZaurr.html -SplitReports
#invoke-gpozaurr -Type GPOOrganizationalUnit
#Invoke-GPOZaurr -Online -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Type GPOAnalysis #-SplitReports -Forest test.evotec.pl
Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html # -Verbose #-Type GPOBlockedInheritance -Forest 'ad.evotec.xyz'
+16
View File
@@ -0,0 +1,16 @@
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
#Save-GPOZaurrFiles -GPOPath $Env:USERPROFILE\Desktop\TestF
#Get-GPOZaurr -GPOPath "$Env:USERPROFILE\Desktop\TestF" | Sort-Object -Property DisplayName | Where-Object { $_.EMpty -eq $true } | Format-Table *
return
$GPO = Get-GPOZaurr -GPOName 'ALL | Allow use of biometrics'
$GPO | Format-List *
#$GPO.Count
#$GPO | Where-Object { $_.Empty -eq $true } | Format-Table *
#($GPO | Where-Object { $_.Empty -eq $true }).Count
#$GPO | Where-Object { $_.DisplayName -like "*TEST*" } | Format-Table *
+1 -4
View File
@@ -3,12 +3,9 @@
$Output = Invoke-GPOZaurrContent -Verbose -GPOName 'Default Domain Policy'
$Output | Format-Table
<#
# You need PSWriteOffice for that
foreach ($Key in $Output.Keys) {
$Output[$Key] | Export-OfficeExcel -FilePath $Env:USERPROFILE\Desktop\GPOAnalysis.xlsx -WorkSheetName $Key
}
Invoke-GPOZaurr -Type GPOAnalysis -GPOName 'ALL | Allow use of biometrics', 'ALL | Enable RDP' -GPOGUID '{31B2F340-016D-11D2-945F-00C04FB984F9}' -IncludeDomains 'ad.evotec.xyz' -Verbose
#>
Invoke-GPOZaurr -Type GPOAnalysis -GPOName 'ALL | Allow use of biometrics', 'ALL | Enable RDP' -GPOGUID '{31B2F340-016D-11D2-945F-00C04FB984F9}' -IncludeDomains 'ad.evotec.xyz' -Verbose
+4
View File
@@ -0,0 +1,4 @@
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
Get-GPOZaurrDuplicateObject -Verbose
+1 -1
View File
@@ -3097,7 +3097,7 @@ Import-Module GPOZaurr -Force</pre><div class="defaultText"><span>Using force ma
"When executed it will take a while to generate all data and provide you with new report depending on size of environment."
"Once confirmed that data is still showing issues and requires fixing please proceed with next step."
</span></div><div class="defaultText"><span>Alternatively if you prefer working with console you can run: </span></div><pre data-enlighter-language="powershell">$GPOOutput = Get-GPOZaurrPermissionConsistency
$GPOOutput | Format-Table # do your actions as desired</pre><div class="defaultText"><span>It provides same data as you see in table above just doesn't prettify it for you.</span></div></div><div style="padding:0px" id="WizardStep-0tiejcyn" class="tab-pane flexElement" role="tabpanel"><div class="defaultText"><span>Following command when executed fixes inconsistent permissions.</span></div><div class="defaultText"><span style="color:#000000;font-weight:normal">Make sure when running it for the first time to run it with </span><span style="color:#ff0000;font-weight:bold">WhatIf</span><span style="color:#000000;font-weight:normal"> parameter as shown below to prevent accidental removal.</span></div><div class="defaultText"><span>Make sure to fill in TargetDomain to match your Domain Admin permission account</span></div><pre data-enlighter-language="powershell">Repair-GPOZaurrPermissionConsistency -IncludeDomains "TargetDomain" -Verbose -WhatIf</pre><div class="defaultText"><span>After execution please make sure there are no errors, make sure to review provided output, and confirm that what is about to be deleted matches expected data. Once happy with results please follow with command: </span></div><pre data-enlighter-language="powershell">Repair-GPOZaurrPermissionConsistency -LimitProcessing 2 -IncludeDomains "TargetDomain"</pre><div class="defaultText"><span>This command when executed repairs only first X inconsistent permissions. Use LimitProcessing parameter to prevent mass fixing and increase the counter when no errors occur. </span><span>Repeat step above as much as needed increasing LimitProcessing count till there's nothing left. In case of any issues please review and action accordingly. </span></div><div class="defaultText"><span>If there's nothing else to be fixed, we can skip to next step step</span></div></div><div style="padding:0px" id="WizardStep-rj10lm2s" class="tab-pane flexElement" role="tabpanel"><div class="defaultText"><span>Unfortunetly this step is manual until automation is developed. </span></div><div class="defaultText"><span>If there are inconsistent permissions found inside GPO one has to fix them manually by going into SYSVOL and making sure inheritance is enabled, and that permissions are consistent across all files.</span></div></div><div style="padding:0px" id="WizardStep-xg65antb" class="tab-pane flexElement" role="tabpanel"><div class="defaultText"><span>Once cleanup task was executed properly, we need to verify that report now shows no problems.</span></div><pre data-enlighter-language="powershell">Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrPermissionsInconsistentAfter.html -Verbose -Type GPOConsistency</pre><div class="defaultText"><span style="color:#4d1a7f">If everything is healthy in the report you're done! Enjoy rest of the day!</span></div></div></div><script> $(document).ready(function(){
$GPOOutput | Format-Table # do your actions as desired</pre><div class="defaultText"><span>It provides same data as you see in table above just doesn't prettify it for you.</span></div></div><div style="padding:0px" id="WizardStep-0tiejcyn" class="tab-pane flexElement" role="tabpanel"><div class="defaultText"><span>Following command when executed fixes inconsistent permissions.</span></div><div class="defaultText"><span style="color:#000000;font-weight:normal">Make sure when running it for the first time to run it with </span><span style="color:#ff0000;font-weight:bold">WhatIf</span><span style="color:#000000;font-weight:normal"> parameter as shown below to prevent accidental removal.</span></div><div class="defaultText"><span>Make sure to fill in TargetDomain to match your Domain Admin permission account</span></div><pre data-enlighter-language="powershell">Repair-GPOZaurrPermissionConsistency -IncludeDomains "TargetDomain" -Verbose -WhatIf</pre><div class="defaultText"><span>After execution please make sure there are no errors, make sure to review provided output, and confirm that what is about to be deleted matches expected data. Once happy with results please follow with command: </span></div><pre data-enlighter-language="powershell">Repair-GPOZaurrPermissionConsistency -LimitProcessing 2 -IncludeDomains "TargetDomain"</pre><div class="defaultText"><span>This command when executed repairs only first X inconsistent permissions. Use LimitProcessing parameter to prevent mass fixing and increase the counter when no errors occur. </span><span>Repeat step above as much as needed increasing LimitProcessing count till there's nothing left. In case of any issues please review and action accordingly. </span></div><div class="defaultText"><span>If there's nothing else to be fixed, we can skip to next step step</span></div></div><div style="padding:0px" id="WizardStep-rj10lm2s" class="tab-pane flexElement" role="tabpanel"><div class="defaultText"><span>Unfortunately this step is manual until automation is developed. </span></div><div class="defaultText"><span>If there are inconsistent permissions found inside GPO one has to fix them manually by going into SYSVOL and making sure inheritance is enabled, and that permissions are consistent across all files.</span></div></div><div style="padding:0px" id="WizardStep-xg65antb" class="tab-pane flexElement" role="tabpanel"><div class="defaultText"><span>Once cleanup task was executed properly, we need to verify that report now shows no problems.</span></div><pre data-enlighter-language="powershell">Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrPermissionsInconsistentAfter.html -Verbose -Type GPOConsistency</pre><div class="defaultText"><span style="color:#4d1a7f">If everything is healthy in the report you're done! Enjoy rest of the day!</span></div></div></div><script> $(document).ready(function(){
// SmartWizard initialize
$('#TabPanel-fbsgNINg').smartWizard({
"autoAdjustHeight": false,
+4 -4
View File
@@ -8,7 +8,7 @@
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')
GUID = 'f7d4c9e4-0298-4f51-ad77-e8e3febebbde'
ModuleVersion = '1.1.4'
ModuleVersion = '1.1.9'
PowerShellVersion = '5.1'
PrivateData = @{
PSData = @{
@@ -24,15 +24,15 @@
}, @{
Guid = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe'
ModuleName = 'PSSharedGoods'
ModuleVersion = '0.0.291'
ModuleVersion = '0.0.301'
}, @{
Guid = '9fc9fd61-7f11-4f4b-a527-084086f1905f'
ModuleName = 'ADEssentials'
ModuleVersion = '0.0.213'
ModuleVersion = '0.0.226'
}, @{
Guid = 'a7bdf640-f5cb-4acf-9de0-365b322d245c'
ModuleName = 'PSWriteHTML'
ModuleVersion = '1.19.0'
ModuleVersion = '1.27.0'
}, 'CimCmdlets', 'Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Utility', 'Microsoft.PowerShell.Security')
RootModule = 'GPOZaurr.psm1'
}
+28
View File
@@ -1,4 +1,32 @@
function ConvertFrom-XMLRSOP {
<#
.SYNOPSIS
Converts XML data representing Resultant Set of Policy (RSOP) into a structured PowerShell object.
.DESCRIPTION
This function takes XML data representing RSOP and converts it into a structured PowerShell object for easier manipulation and analysis.
.PARAMETER Content
The XML content representing the RSOP data.
.PARAMETER ResultsType
The type of results being processed.
.PARAMETER Splitter
The delimiter used to split certain data elements.
.EXAMPLE
ConvertFrom-XMLRSOP -Content $xmlData -ResultsType "Computer" -Splitter "`n"
Description:
Converts the XML data in $xmlData representing computer RSOP results using a newline as the splitter.
.EXAMPLE
ConvertFrom-XMLRSOP -Content $xmlData -ResultsType "User" -Splitter ","
Description:
Converts the XML data in $xmlData representing user RSOP results using a comma as the splitter.
#>
[cmdletBinding()]
param(
[System.Xml.XmlElement]$Content,
+25
View File
@@ -1,4 +1,29 @@
function ConvertTo-XMLAccountPolicy {
<#
.SYNOPSIS
Converts a PowerShell custom object representing an account policy into XML format.
.DESCRIPTION
This function takes a PowerShell custom object representing an account policy and converts it into XML format for storage or transmission.
.PARAMETER GPO
The PowerShell custom object representing the account policy.
.PARAMETER SingleObject
Indicates whether to convert a single object or multiple objects.
.EXAMPLE
ConvertTo-XMLAccountPolicy -GPO $accountPolicyObject -SingleObject
Description:
Converts the $accountPolicyObject into XML format for a single object.
.EXAMPLE
$accountPolicies | ConvertTo-XMLAccountPolicy -SingleObject
Description:
Converts multiple account policies in $accountPolicies into XML format for each object.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+25
View File
@@ -1,4 +1,29 @@
function ConvertTo-XMLAudit {
<#
.SYNOPSIS
Converts a PowerShell custom object representing an audit policy into XML format.
.DESCRIPTION
This function takes a PowerShell custom object representing an audit policy and converts it into XML format for storage or transmission.
.PARAMETER GPO
The PowerShell custom object representing the audit policy.
.PARAMETER SingleObject
Indicates whether to convert a single object or multiple objects.
.EXAMPLE
ConvertTo-XMLAudit -GPO $auditPolicyObject -SingleObject
Description:
Converts the $auditPolicyObject into XML format for a single object.
.EXAMPLE
$auditPolicies | ConvertTo-XMLAudit -SingleObject
Description:
Converts multiple audit policies in $auditPolicies into XML format for each object.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+28
View File
@@ -1,4 +1,32 @@
function ConvertTo-XMLCertificates {
<#
.SYNOPSIS
Converts a PowerShell custom object representing certificate data into XML format.
.DESCRIPTION
This function takes a PowerShell custom object representing certificate data and converts it into XML format for storage or transmission.
.PARAMETER GPO
The PowerShell custom object representing the certificate data.
.PARAMETER Category
An array of categories for the certificate data.
.PARAMETER SingleObject
Indicates whether to convert a single object or multiple objects.
.EXAMPLE
ConvertTo-XMLCertificates -GPO $certificateDataObject -Category @('Category1', 'Category2') -SingleObject
Description:
Converts the $certificateDataObject into XML format for multiple categories as a single object.
.EXAMPLE
$certificateDataObjects | ConvertTo-XMLCertificates -Category @('Category1') -SingleObject
Description:
Converts multiple certificate data objects in $certificateDataObjects into XML format for a single category.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+25
View File
@@ -1,4 +1,29 @@
function ConvertTo-XMLDriveMapSettings {
<#
.SYNOPSIS
Converts a PowerShell custom object representing drive mapping settings into XML format.
.DESCRIPTION
This function takes a PowerShell custom object representing drive mapping settings and converts it into XML format for storage or transmission.
.PARAMETER GPO
The PowerShell custom object representing the drive mapping settings.
.PARAMETER SingleObject
Indicates whether to convert a single object or multiple objects.
.EXAMPLE
ConvertTo-XMLDriveMapSettings -GPO $driveMapSettingsObject -SingleObject
Description:
Converts the $driveMapSettingsObject into XML format for a single object.
.EXAMPLE
$driveMapSettings | ConvertTo-XMLDriveMapSettings -SingleObject
Description:
Converts multiple drive mapping settings in $driveMapSettings into XML format for each object.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+34
View File
@@ -1,4 +1,38 @@
function ConvertTo-XMLEventLog {
<#
.SYNOPSIS
Converts Group Policy Object (GPO) data to an XML event log format.
.DESCRIPTION
This function takes a PSCustomObject representing GPO data and converts it to an XML event log format. It creates a structured XML output with specific GPO properties.
.PARAMETER GPO
Specifies the PSCustomObject containing GPO data to be converted.
.EXAMPLE
$GPOData = [PSCustomObject]@{
DisplayName = 'Example GPO'
DomainName = 'example.com'
GUID = '12345678-1234-1234-1234-1234567890AB'
GpoType = 'Security'
DataSet = @(
[PSCustomObject]@{
Log = 'Application'
Name = 'AuditLogRetentionPeriod'
SettingNumber = '1'
},
[PSCustomObject]@{
Log = 'System'
Name = 'MaximumLogSize'
SettingNumber = '1024'
}
)
Linked = $true
LinksCount = 2
Links = @('OU=Finance,DC=example,DC=com', 'OU=IT,DC=example,DC=com')
}
ConvertTo-XMLEventLog -GPO $GPOData
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO
@@ -1,4 +1,29 @@
function ConvertTo-XMLFolderRedirection {
<#
.SYNOPSIS
Converts a PowerShell custom object representing folder redirection settings into XML format.
.DESCRIPTION
This function takes a PowerShell custom object representing folder redirection settings and converts it into XML format for storage or transmission.
.PARAMETER GPO
The PowerShell custom object representing the folder redirection settings.
.PARAMETER SingleObject
Indicates whether to convert a single object or multiple objects.
.EXAMPLE
ConvertTo-XMLFolderRedirection -GPO $folderRedirectionSettingsObject -SingleObject
Description:
Converts the $folderRedirectionSettingsObject into XML format for a single object.
.EXAMPLE
$folderRedirectionSettings | ConvertTo-XMLFolderRedirection -SingleObject
Description:
Converts multiple folder redirection settings in $folderRedirectionSettings into XML format for each object.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+28
View File
@@ -1,4 +1,32 @@
function ConvertTo-XMLGenericPolicy {
<#
.SYNOPSIS
Converts a PowerShell custom object representing generic policy settings into XML format.
.DESCRIPTION
This function takes a PowerShell custom object representing generic policy settings and converts it into XML format for storage or transmission.
.PARAMETER GPO
The PowerShell custom object representing the generic policy settings.
.PARAMETER Category
An array of categories for the generic policy settings.
.PARAMETER SingleObject
Indicates whether to convert a single object or multiple objects.
.EXAMPLE
ConvertTo-XMLGenericPolicy -GPO $genericPolicyObject -Category @('Category1', 'Category2') -SingleObject
Description:
Converts the $genericPolicyObject into XML format for multiple categories as a single object.
.EXAMPLE
$genericPolicyObjects | ConvertTo-XMLGenericPolicy -Category @('Category1') -SingleObject
Description:
Converts multiple generic policy settings in $genericPolicyObjects into XML format for a single category.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+25
View File
@@ -1,4 +1,29 @@
function ConvertTo-XMLGenericPublicKey {
<#
.SYNOPSIS
Converts a PSCustomObject representing a Group Policy Object (GPO) to an XML format.
.DESCRIPTION
This function takes a PSCustomObject representing a GPO and converts it to an XML format. It extracts specific properties from the GPO object and organizes them into a structured XML output.
.PARAMETER GPO
Specifies the PSCustomObject representing the GPO to be converted.
.PARAMETER Category
Specifies an array of strings representing categories to include in the XML output.
.PARAMETER SingleObject
Indicates whether to convert a single GPO object or multiple GPO objects.
.EXAMPLE
ConvertTo-XMLGenericPublicKey -GPO $MyGPO -Category @("Category1", "Category2") -SingleObject
Converts the PSCustomObject $MyGPO to an XML format including categories "Category1" and "Category2" as a single object.
.EXAMPLE
$GPOs | ConvertTo-XMLGenericPublicKey -Category @("Category1")
Converts multiple GPOs in the $GPOs array to an XML format including category "Category1".
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
@@ -1,4 +1,29 @@
function ConvertTo-XMLGenericSecuritySettings {
<#
.SYNOPSIS
Converts Generic Security Settings to XML format.
.DESCRIPTION
This function converts Generic Security Settings to XML format for further processing.
.PARAMETER GPO
Specifies the Group Policy Object (GPO) to convert.
.PARAMETER Category
Specifies the category of settings to convert.
.EXAMPLE
ConvertTo-XMLGenericSecuritySettings -GPO $GPOObject -Category 'Security'
Description:
Converts the security settings of the specified GPO object to XML format.
.EXAMPLE
ConvertTo-XMLGenericSecuritySettings -GPO $GPOObject -Category 'Network'
Description:
Converts the network settings of the specified GPO object to XML format.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+22
View File
@@ -1,4 +1,26 @@
function ConvertTo-XMLLocalGroups {
<#
.SYNOPSIS
Converts Group Policy Objects (GPO) to XML format for local groups.
.DESCRIPTION
This function converts Group Policy Objects (GPO) to XML format for local groups. It takes a GPO object and an optional switch to process a single object.
.PARAMETER GPO
Specifies the Group Policy Object (GPO) to be converted to XML format.
.PARAMETER SingleObject
Indicates whether to process a single GPO object.
.EXAMPLE
ConvertTo-XMLLocalGroups -GPO $myGPO
Converts the specified GPO object to XML format for local groups.
.EXAMPLE
ConvertTo-XMLLocalGroups -GPO $myGPO -SingleObject
Converts a single GPO object to XML format for local groups.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+23
View File
@@ -1,4 +1,27 @@
function ConvertTo-XMLLocalUser {
<#
.SYNOPSIS
Converts Group Policy Objects (GPO) data to XML format for local users.
.DESCRIPTION
This function converts GPO data to XML format specifically for local users. It extracts relevant user settings from the GPO data and organizes them into a structured XML format.
.PARAMETER GPO
Specifies the GPO object containing user data to be converted.
.PARAMETER SingleObject
Indicates whether to convert a single user object or multiple user objects.
.EXAMPLE
ConvertTo-XMLLocalUser -GPO $myGPO -SingleObject
Converts a single GPO object to XML format for local users.
.EXAMPLE
ConvertTo-XMLLocalUser -GPO $myGPO
Converts multiple GPO objects to XML format for local users.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+31
View File
@@ -1,4 +1,35 @@
function ConvertTo-XMLNested {
<#
.SYNOPSIS
Converts nested XML elements to a structured format for further processing.
.DESCRIPTION
This function recursively converts nested XML elements to a structured format for easier manipulation and analysis. It extracts properties from the XML elements and organizes them into a hierarchical structure.
.PARAMETER CreateGPO
Specifies the dictionary representing the XML structure being created.
.PARAMETER Setting
Specifies the XML element to be processed.
.PARAMETER SkipNames
Specifies an array of property names to skip during processing.
.PARAMETER Name
Specifies the name of the current XML element being processed.
.EXAMPLE
ConvertTo-XMLNested -CreateGPO $MyGPO -Setting $XmlSetting -SkipNames @('Name', 'Value') -Name 'Root'
Description:
Converts the nested XML element $XmlSetting into a structured format stored in $MyGPO, skipping properties 'Name' and 'Value', with the root element named 'Root'.
.EXAMPLE
$XmlElements | ForEach-Object { ConvertTo-XMLNested -CreateGPO $Output -Setting $_ -SkipNames @('ID') -Name 'Element' }
Description:
Processes multiple XML elements in $XmlElements, converting each into a structured format stored in $Output, skipping property 'ID', and naming each element 'Element'.
#>
[cmdletBinding()]
param(
[System.Collections.IDictionary] $CreateGPO,
+22
View File
@@ -1,4 +1,26 @@
function ConvertTo-XMLPolicies {
<#
.SYNOPSIS
Converts Group Policy Object (GPO) data to XML format.
.DESCRIPTION
This function converts the provided GPO data into XML format for easier processing and analysis.
.PARAMETER GPO
Specifies the GPO object containing the data to be converted.
.PARAMETER SingleObject
Indicates whether to convert a single GPO object or multiple GPO objects.
.EXAMPLE
ConvertTo-XMLPolicies -GPO $myGPO -SingleObject
Converts a single GPO object $myGPO to XML format.
.EXAMPLE
ConvertTo-XMLPolicies -GPO $GPOList
Converts multiple GPO objects in $GPOList to XML format.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+22
View File
@@ -1,4 +1,26 @@
function ConvertTo-XMLPrinter {
<#
.SYNOPSIS
Converts Group Policy Objects (GPO) to an XML printer format.
.DESCRIPTION
This function converts GPO objects to an XML printer format, providing detailed information about printers and printer connections.
.PARAMETER GPO
Specifies the GPO object to be converted.
.PARAMETER SingleObject
Indicates whether to convert a single GPO object or multiple GPO objects.
.EXAMPLE
ConvertTo-XMLPrinter -GPO $myGPO -SingleObject
Converts a single GPO object $myGPO to an XML printer format.
.EXAMPLE
ConvertTo-XMLPrinter -GPO $myGPO
Converts multiple GPO objects to an XML printer format.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+28
View File
@@ -1,4 +1,32 @@
function ConvertTo-XMLPrinterInternal {
<#
.SYNOPSIS
Converts printer settings to XML format for internal use.
.DESCRIPTION
This function converts printer settings to XML format for internal use. It takes a GPO object, entry details, type, and a switch for limited output. The output includes various printer settings in XML format.
.PARAMETER GPO
The GPO object containing printer settings.
.PARAMETER Entry
Details of the printer entry.
.PARAMETER Type
The type of printer setting.
.PARAMETER Limited
Switch to output limited printer settings.
.EXAMPLE
ConvertTo-XMLPrinterInternal -GPO $GPO -Entry $Entry -Type "Network" -Limited
Converts the specified printer settings to XML format with limited output.
.EXAMPLE
ConvertTo-XMLPrinterInternal -GPO $GPO -Entry $Entry -Type "Local"
Converts the specified printer settings to XML format without limited output.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
@@ -1,4 +1,59 @@
function ConvertTo-XMLRegistryAutologon {
<#
.SYNOPSIS
Converts a Group Policy Object (GPO) to an XML format for Registry Autologon settings.
.DESCRIPTION
This function takes a GPO object as input and extracts relevant Registry Autologon settings to create an XML representation.
.PARAMETER GPO
Specifies the Group Policy Object (GPO) to be converted to XML format for Registry Autologon settings.
.EXAMPLE
$GPO = [PSCustomObject]@{
DisplayName = "Autologon GPO"
DomainName = "example.com"
GUID = "12345678-1234-5678-1234-567812345678"
GpoType = "Registry"
DataSet = [PSCustomObject]@{
Registry = @(
[PSCustomObject]@{
Properties = [PSCustomObject]@{
Key = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
Name = "AutoAdminLogon"
Value = $true
Changed = Get-Date
}
},
[PSCustomObject]@{
Properties = [PSCustomObject]@{
Key = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
Name = "DefaultDomainName"
Value = "example.com"
Changed = Get-Date
}
},
[PSCustomObject]@{
Properties = [PSCustomObject]@{
Key = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
Name = "DefaultUserName"
Value = "user"
Changed = Get-Date
}
},
[PSCustomObject]@{
Properties = [PSCustomObject]@{
Key = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
Name = "DefaultPassword"
Value = "password"
Changed = Get-Date
}
}
)
}
}
ConvertTo-XMLRegistryAutologon -GPO $GPO
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO
@@ -1,4 +1,34 @@
function ConvertTo-XMLRegistryAutologonOnReport {
<#
.SYNOPSIS
Converts Group Policy Object (GPO) settings related to Autologon into an XML report.
.DESCRIPTION
This function takes a GPO object as input and extracts Autologon related settings to generate an XML report.
.PARAMETER GPO
Specifies the GPO object containing Autologon settings.
.EXAMPLE
$GPO = [PSCustomObject]@{
DisplayName = "Autologon GPO"
DomainName = "example.com"
GUID = "12345678-1234-1234-1234-1234567890AB"
GpoType = "Security"
Settings = @(
[PSCustomObject]@{
Key = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
Name = "AutoAdminLogon"
Value = $true
Changed = (Get-Date)
}
)
Linked = $true
LinksCount = 1
Links = "area1.local"
}
ConvertTo-XMLRegistryAutologonOnReport -GPO $GPO
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO
@@ -1,4 +1,19 @@
function ConvertTo-XMLRegistryInternetExplorerZones {
<#
.SYNOPSIS
Converts registry settings related to Internet Explorer security zones into XML format.
.DESCRIPTION
This function converts registry settings from a Group Policy Object (GPO) related to Internet Explorer security zones into XML format. It extracts relevant information such as display name, domain name, GUID, GPO type, configuration, policy type, and security zone based on the registry settings provided.
.PARAMETER GPO
Specifies the Group Policy Object (GPO) containing the registry settings to be converted.
.EXAMPLE
ConvertTo-XMLRegistryInternetExplorerZones -GPO $GPO
Converts the registry settings from the specified Group Policy Object ($GPO) related to Internet Explorer security zones into XML format.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO
+22
View File
@@ -1,4 +1,26 @@
function ConvertTo-XMLRegistrySettings {
<#
.SYNOPSIS
Converts Group Policy Object (GPO) settings to XML format.
.DESCRIPTION
This function converts the settings of a Group Policy Object (GPO) to XML format. It can be used to export GPO settings for analysis or backup purposes.
.PARAMETER GPO
Specifies the Group Policy Object (GPO) to convert to XML format.
.PARAMETER SingleObject
Indicates whether to convert a single GPO object or multiple GPO objects.
.EXAMPLE
ConvertTo-XMLRegistrySettings -GPO $myGPO -SingleObject
Converts a single GPO object to XML format.
.EXAMPLE
ConvertTo-XMLRegistrySettings -GPO $myGPO
Converts multiple GPO objects to XML format.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+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
}
}
}
+22
View File
@@ -1,4 +1,26 @@
function ConvertTo-XMLScripts {
<#
.SYNOPSIS
Converts Group Policy Objects (GPO) to XML scripts.
.DESCRIPTION
This function converts GPO objects to XML scripts for further processing.
.PARAMETER GPO
Specifies the GPO object to be converted.
.PARAMETER SingleObject
Indicates whether to convert a single GPO object or multiple GPO objects.
.EXAMPLE
ConvertTo-XMLScripts -GPO $myGPO -SingleObject
Converts a single GPO object to an XML script.
.EXAMPLE
ConvertTo-XMLScripts -GPO $myGPO
Converts multiple GPO objects to XML scripts.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+22
View File
@@ -1,4 +1,26 @@
function ConvertTo-XMLSecurityOptions {
<#
.SYNOPSIS
Converts Group Policy Object (GPO) data to XML security options.
.DESCRIPTION
This function converts GPO data to XML security options for further processing.
.PARAMETER GPO
Specifies the GPO object to convert.
.PARAMETER SingleObject
Indicates whether to convert a single GPO object.
.EXAMPLE
ConvertTo-XMLSecurityOptions -GPO $myGPO -SingleObject
Converts a single GPO object to XML security options.
.EXAMPLE
ConvertTo-XMLSecurityOptions -GPO $myGPO
Converts multiple GPO objects to XML security options.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
@@ -1,4 +1,26 @@
function ConvertTo-XMLSoftwareInstallation {
<#
.SYNOPSIS
Converts Group Policy Object (GPO) data into XML format for software installation.
.DESCRIPTION
This function takes GPO data and converts it into XML format suitable for software installation. It creates an XML structure with detailed information about each software installation entry.
.PARAMETER GPO
Specifies the GPO object containing software installation data.
.PARAMETER SingleObject
Indicates whether to convert a single GPO object or multiple objects.
.EXAMPLE
ConvertTo-XMLSoftwareInstallation -GPO $GPOObject -SingleObject
Converts a single GPO object into XML format for software installation.
.EXAMPLE
ConvertTo-XMLSoftwareInstallation -GPO $GPOObject
Converts multiple GPO objects into XML format for software installation.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+22
View File
@@ -1,4 +1,26 @@
function ConvertTo-XMLSystemServices {
<#
.SYNOPSIS
Converts Group Policy Objects (GPO) data to an XML format for System Services.
.DESCRIPTION
This function takes a GPO object and converts its data into an XML format suitable for System Services. It organizes the GPO data including service names, startup modes, security auditing status, permissions, and security descriptors.
.PARAMETER GPO
Specifies the GPO object to be converted to XML format.
.PARAMETER SingleObject
Indicates whether to convert a single GPO object or multiple GPO objects.
.EXAMPLE
ConvertTo-XMLSystemServices -GPO $myGPO -SingleObject
Converts a single GPO object $myGPO to XML format for System Services.
.EXAMPLE
ConvertTo-XMLSystemServices -GPO $myGPO
Converts multiple GPO objects to XML format for System Services.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+21
View File
@@ -1,4 +1,25 @@
function ConvertTo-XMLSystemServicesNT {
<#
.SYNOPSIS
Converts a Group Policy Object (GPO) to an XML representation for System Services on Windows NT.
.DESCRIPTION
This function takes a GPO object and converts it into an XML format specifically tailored for System Services on Windows NT. It extracts relevant information about each service defined in the GPO and structures it in an XML format.
.PARAMETER GPO
Specifies the Group Policy Object (GPO) to be converted to XML.
.PARAMETER SingleObject
Indicates whether to convert a single GPO object or multiple GPO objects.
.EXAMPLE
ConvertTo-XMLSystemServicesNT -GPO $myGPO -SingleObject
Converts a single GPO object $myGPO to an XML representation for System Services on Windows NT.
.EXAMPLE
$GPOs | ConvertTo-XMLSystemServicesNT
Converts multiple GPO objects in the $GPOs array to XML representations for System Services on Windows NT.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+21
View File
@@ -1,4 +1,25 @@
function ConvertTo-XMLTaskScheduler {
<#
.SYNOPSIS
Converts Task Scheduler settings to XML format.
.DESCRIPTION
This function converts Task Scheduler settings from a PSCustomObject to XML format. It provides detailed information about the task settings for each task.
.PARAMETER GPO
Specifies the Group Policy Object (GPO) containing the Task Scheduler settings.
.PARAMETER SingleObject
Indicates whether to convert a single object or multiple objects.
.EXAMPLE
ConvertTo-XMLTaskScheduler -GPO $GPOObject -SingleObject
Converts the Task Scheduler settings from the specified GPO object to XML format for a single object.
.EXAMPLE
ConvertTo-XMLTaskScheduler -GPO $GPOObject
Converts the Task Scheduler settings from the specified GPO object to XML format for multiple objects.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
@@ -1,4 +1,26 @@
function ConvertTo-XMLUserRightsAssignment {
<#
.SYNOPSIS
Converts user rights assignments to XML format.
.DESCRIPTION
This function converts user rights assignments to XML format based on the provided GPO object.
.PARAMETER GPO
Specifies the Group Policy Object (GPO) to extract user rights assignments from.
.PARAMETER SingleObject
Indicates whether to process a single object.
.EXAMPLE
ConvertTo-XMLUserRightsAssignment -GPO $GPOObject -SingleObject
Converts user rights assignments from a single GPO object to XML format.
.EXAMPLE
ConvertTo-XMLUserRightsAssignment -GPO $GPOObject
Converts user rights assignments from multiple GPO objects to XML format.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+22
View File
@@ -1,4 +1,26 @@
function ConvertTo-XMLWindowsFirewall {
<#
.SYNOPSIS
Converts a Group Policy Object (GPO) to an XML representation for Windows Firewall settings.
.DESCRIPTION
This function takes a GPO object and converts it into an XML format suitable for Windows Firewall settings. It can handle single GPO objects or multiple GPO objects.
.PARAMETER GPO
Specifies the Group Policy Object to be converted to XML.
.PARAMETER SingleObject
Indicates whether to convert a single GPO object or multiple GPO objects.
.EXAMPLE
ConvertTo-XMLWindowsFirewall -GPO $myGPO -SingleObject
Converts a single GPO object $myGPO to an XML representation for Windows Firewall settings.
.EXAMPLE
$GPOs | ConvertTo-XMLWindowsFirewall
Converts multiple GPO objects in the $GPOs array to XML representations for Windows Firewall settings.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
@@ -1,4 +1,25 @@
function ConvertTo-XMLWindowsFirewallConnectionSecurityAuthentiation {
<#
.SYNOPSIS
Converts Windows Firewall Connection Security Authentication settings to XML format.
.DESCRIPTION
This function converts Windows Firewall Connection Security Authentication settings from a PSCustomObject to XML format. It provides detailed information about the authentication settings for each connection.
.PARAMETER GPO
Specifies the Group Policy Object (GPO) containing the Windows Firewall Connection Security Authentication settings.
.PARAMETER SingleObject
Indicates whether to convert a single object or multiple objects.
.EXAMPLE
ConvertTo-XMLWindowsFirewallConnectionSecurityAuthentiation -GPO $GPOObject -SingleObject
Converts the Windows Firewall Connection Security Authentication settings from the specified GPO object to XML format for a single object.
.EXAMPLE
ConvertTo-XMLWindowsFirewallConnectionSecurityAuthentiation -GPO $GPOObject
Converts the Windows Firewall Connection Security Authentication settings from the specified GPO object to XML format for multiple objects.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
@@ -1,4 +1,26 @@
function ConvertTo-XMLWindowsFirewallProfile {
<#
.SYNOPSIS
Converts a Windows Firewall profile to XML format.
.DESCRIPTION
This function takes a Windows Firewall profile object and converts it to XML format for further processing.
.PARAMETER GPO
Specifies the Windows Firewall profile object to convert.
.PARAMETER SingleObject
Indicates whether to convert a single object or multiple objects.
.EXAMPLE
ConvertTo-XMLWindowsFirewallProfile -GPO $FirewallProfile -SingleObject
Converts a single Windows Firewall profile object to XML format.
.EXAMPLE
ConvertTo-XMLWindowsFirewallProfile -GPO $FirewallProfiles -SingleObject:$false
Converts multiple Windows Firewall profile objects to XML format.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
@@ -1,4 +1,26 @@
function ConvertTo-XMLWindowsFirewallRules {
<#
.SYNOPSIS
Converts Windows Firewall rules to XML format.
.DESCRIPTION
This function converts Windows Firewall rules to XML format for easier management and analysis.
.PARAMETER GPO
Specifies the Group Policy Object (GPO) containing the firewall rules to be converted.
.PARAMETER SingleObject
Indicates whether to convert a single firewall rule object.
.EXAMPLE
ConvertTo-XMLWindowsFirewallRules -GPO $GPOObject -SingleObject
Converts all firewall rules in the specified GPO to XML format.
.EXAMPLE
ConvertTo-XMLWindowsFirewallRules -GPO $GPOObject
Converts all firewall rules in the specified GPO to XML format without creating a single object.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
@@ -1,4 +1,28 @@
function ConvertTo-XMLWindowsFirewallSecurityRules {
<#
.SYNOPSIS
Converts Windows Firewall security rules data to XML format.
.DESCRIPTION
This function converts Windows Firewall security rules data to XML format. It takes a GPO object as input and generates XML data representing the security rules.
.PARAMETER GPO
Specifies the Group Policy Object (GPO) containing the security rules data.
.PARAMETER SingleObject
Indicates whether to convert a single GPO object or multiple security rules.
.EXAMPLE
$GPO = Get-GPO -Name "FirewallRules"
ConvertTo-XMLWindowsFirewallSecurityRules -GPO $GPO -SingleObject
Converts the security rules data from the GPO "FirewallRules" to XML format for a single GPO object.
.EXAMPLE
$GPOs = Get-GPO -All
ConvertTo-XMLWindowsFirewallSecurityRules -GPO $GPOs -SingleObject:$false
Converts the security rules data from all GPOs to XML format for multiple security rules.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+15
View File
@@ -1,4 +1,19 @@
function Find-GPOPassword {
<#
.SYNOPSIS
Finds and decrypts the password stored in the cpassword attribute of a Group Policy Object (GPO) XML file.
.DESCRIPTION
This function takes the path to a GPO XML file as input, searches for the cpassword attribute, decrypts it, and returns the password.
.PARAMETER Path
Specifies the path to the GPO XML file.
.EXAMPLE
Find-GPOPassword -Path "C:\GPOs\GPO1.xml"
Searches for the cpassword attribute in the GPO XML file "GPO1.xml" and returns the decrypted password.
#>
[cmdletBinding()]
param(
[string] $Path
+21
View File
@@ -1,4 +1,25 @@
function Format-CamelCaseToDisplayName {
<#
.SYNOPSIS
Converts a camelCase string to a display name with spaces.
.DESCRIPTION
This function takes a camelCase string and converts it to a display name by adding spaces between words.
.PARAMETER Text
The camelCase string(s) to be converted to display name.
.PARAMETER AddChar
The character to add between words in the display name.
.EXAMPLE
Format-CamelCaseToDisplayName -Text 'testString' -AddChar ' '
Converts 'testString' to 'Test String'
.EXAMPLE
Format-CamelCaseToDisplayName -Text 'anotherExample' -AddChar '-'
Converts 'anotherExample' to 'Another-Example'
#>
[cmdletBinding()]
param(
[string[]] $Text,
+33
View File
@@ -1,4 +1,37 @@
function Get-ChoosenDates {
<#
.SYNOPSIS
Retrieves dates based on the specified date range.
.DESCRIPTION
This function retrieves dates based on the specified date range. The available date ranges are:
- Everything
- PastHour
- CurrentHour
- PastDay
- CurrentDay
- PastMonth
- CurrentMonth
- PastQuarter
- CurrentQuarter
- Last14Days
- Last21Days
- Last30Days
- Last7Days
- Last3Days
- Last1Days
.PARAMETER DateRange
Specifies the date range to retrieve dates for.
.EXAMPLE
Get-ChoosenDates -DateRange PastHour
Retrieves dates for the past hour.
.EXAMPLE
Get-ChoosenDates -DateRange CurrentMonth
Retrieves dates for the current month.
#>
[CmdletBinding()]
param(
[ValidateSet('Everything', 'PastHour', 'CurrentHour', 'PastDay', 'CurrentDay', 'PastMonth', 'CurrentMonth', 'PastQuarter', 'CurrentQuarter', 'Last14Days', 'Last21Days', 'Last30Days' , 'Last7Days', 'Last3Days', 'Last1Days')][string] $DateRange
+34
View File
@@ -1,4 +1,38 @@
function Get-GPOBlockedInheritance {
<#
.SYNOPSIS
Retrieves information about Organizational Units (OUs) with blocked inheritance of Group Policy Objects (GPOs).
.DESCRIPTION
The Get-GPOBlockedInheritance function retrieves information about OUs within a specified forest that have blocked inheritance of GPOs. It returns a list of OUs with their distinguished names and whether they have blocked inheritance enabled.
.PARAMETER Filter
Specifies a filter to select specific OUs. Default is '*'.
.PARAMETER Forest
Specifies the name of the forest to query.
.PARAMETER ExcludeDomains
Specifies an array of domain names to exclude from the query.
.PARAMETER IncludeDomains
Specifies an array of domain names to include in the query.
.PARAMETER AsHashTable
Indicates whether to return the results as a hashtable. If specified, the function returns a hashtable with OU distinguished names as keys and blocked inheritance status as values.
.PARAMETER ExtendedForestInformation
Specifies additional forest information to include in the query.
.EXAMPLE
Get-GPOBlockedInheritance -Forest 'contoso.com'
Retrieves a list of all OUs within the 'contoso.com' forest with blocked inheritance status.
.EXAMPLE
Get-GPOBlockedInheritance -Forest 'contoso.com' -IncludeDomains 'child1.contoso.com', 'child2.contoso.com' -AsHashTable
Retrieves a hashtable of OUs within the 'contoso.com' forest from specified domains with blocked inheritance status.
#>
[cmdletBinding()]
param(
[string] $Filter = '*',
+29
View File
@@ -1,4 +1,33 @@
function Get-GPOCategories {
<#
.SYNOPSIS
Retrieves GPO categories based on the provided GPO object and XML output.
.DESCRIPTION
This function retrieves GPO categories by analyzing the provided GPO object and XML output. It categorizes GPO settings based on different criteria.
.PARAMETER GPO
The GPO object containing information about the Group Policy Object.
.PARAMETER GPOOutput
An array of XML elements representing the GPO output.
.PARAMETER Splitter
The delimiter used to split GPO settings.
.PARAMETER FullObjects
A switch parameter to indicate whether to retrieve full GPO objects.
.PARAMETER CachedCategories
A dictionary containing cached GPO categories.
.EXAMPLE
Get-GPOCategories -GPO $gpoObject -GPOOutput $xmlOutput -Splitter ":" -FullObjects
Description:
Retrieves GPO categories for the specified GPO object and XML output, splitting settings using ":" as the delimiter and retrieving full GPO objects.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+33
View File
@@ -1,4 +1,37 @@
function Get-GPOPrivInheritance {
<#
.SYNOPSIS
Retrieves the Group Policy Object (GPO) inheritance information for a given Active Directory object.
.DESCRIPTION
This function retrieves the inheritance information of Group Policy Objects (GPOs) for a specified Active Directory object. It provides details on how GPOs are linked and inherited by the object.
.PARAMETER ADObject
Specifies the Active Directory object for which to retrieve GPO inheritance information.
.PARAMETER CacheReturnedGPOs
Specifies a dictionary containing cached GPO information to optimize retrieval.
.PARAMETER ForestInformation
Specifies a dictionary containing information about the Active Directory forest.
.PARAMETER Domain
Specifies the domain for which to retrieve GPO privilege link information.
.PARAMETER SkipDomainRoot
Indicates whether to skip the Domain Root container.
.PARAMETER SkipDomainControllers
Indicates whether to skip the Domain Controllers container.
.EXAMPLE
Get-GPOPrivInheritance -ADObject $ADObject -CacheReturnedGPOs $Cache -ForestInformation $ForestInfo -Domain "example.com" -SkipDomainRoot -SkipDomainControllers
Retrieves GPO inheritance information for the specified ADObject in the "example.com" domain, skipping the Domain Root container and Domain Controllers container.
.NOTES
File Name : Get-GPOPrivInheritance.ps1
Prerequisite : This function requires the Get-GPInheritance function.
#>
[cmdletBinding()]
param(
[parameter(ParameterSetName = 'ADObject', ValueFromPipeline, ValueFromPipelineByPropertyName, Mandatory)][Microsoft.ActiveDirectory.Management.ADObject[]] $ADObject,
+41
View File
@@ -1,4 +1,45 @@
function Get-GPOPrivInheritanceLoop {
<#
.SYNOPSIS
Retrieves the Group Policy Object (GPO) inheritance loop for a given Active Directory object.
.DESCRIPTION
This function retrieves the GPO inheritance loop for a specified Active Directory object. It analyzes the inheritance of GPOs based on the object's location in the Active Directory structure.
.PARAMETER ADObject
Specifies the Active Directory object for which the GPO inheritance loop needs to be determined.
.PARAMETER CacheReturnedGPOs
Specifies a dictionary containing cached GPO information to optimize retrieval.
.PARAMETER ForestInformation
Specifies a dictionary containing information about the Active Directory forest.
.PARAMETER Linked
Specifies the types of linked objects to consider during the inheritance analysis. Valid values are 'Root', 'DomainControllers', 'OrganizationalUnit'.
.PARAMETER SearchBase
Specifies the base location in Active Directory to start the search for GPO inheritance.
.PARAMETER SearchScope
Specifies the scope of the search in Active Directory.
.PARAMETER Filter
Specifies the filter to apply when searching for Active Directory objects.
.EXAMPLE
Get-GPOPrivInheritanceLoop -ADObject $ADObject -CacheReturnedGPOs $Cache -ForestInformation $ForestInfo -Linked 'Root' -SearchBase 'DC=contoso,DC=com' -SearchScope Subtree -Filter '(objectClass -eq "organizationalUnit")'
Description:
Retrieves the GPO inheritance loop for the specified Active Directory object located in the 'contoso.com' domain starting from the root.
.EXAMPLE
Get-GPOPrivInheritanceLoop -ADObject $ADObject -CacheReturnedGPOs $Cache -ForestInformation $ForestInfo -Linked 'DomainControllers' -SearchBase 'DC=contoso,DC=com' -SearchScope Base -Filter '(objectClass -eq "organizationalUnit")'
Description:
Retrieves the GPO inheritance loop for the specified Active Directory object located in the 'contoso.com' domain starting from the Domain Controllers container.
#>
[cmdletBinding()]
param(
[Microsoft.ActiveDirectory.Management.ADObject[]] $ADObject,
+39
View File
@@ -1,4 +1,43 @@
function Get-GPOPrivLink {
<#
.SYNOPSIS
Retrieves the GPO (Group Policy Object) privilege link information for specified Active Directory objects.
.DESCRIPTION
This function retrieves the GPO privilege link information for the specified Active Directory objects. It allows skipping certain default containers like Domain Root and Domain Controllers if needed. It also provides options to cache returned GPOs and skip duplicates.
.PARAMETER ADObject
Specifies the Active Directory objects for which to retrieve GPO privilege link information.
.PARAMETER CacheReturnedGPOs
Specifies a dictionary to cache returned GPOs for optimization.
.PARAMETER ForestInformation
Specifies a dictionary containing forest information.
.PARAMETER Domain
Specifies the domain for which to retrieve GPO privilege link information.
.PARAMETER SkipDomainRoot
Indicates whether to skip the Domain Root container.
.PARAMETER SkipDomainControllers
Indicates whether to skip the Domain Controllers container.
.PARAMETER AsHashTable
Specifies whether to output the GPO information as a hash table.
.PARAMETER SkipDuplicates
Indicates whether to skip duplicate GPOs.
.EXAMPLE
Get-GPOPrivLink -ADObject $ADObject -CacheReturnedGPOs $Cache -ForestInformation $ForestInfo -Domain "example.com" -SkipDomainRoot -SkipDuplicates
Retrieves GPO privilege link information for the specified ADObject in the "example.com" domain, skipping the Domain Root container and duplicates.
.NOTES
File Name : Get-GPOPrivLink.ps1
Prerequisite : This function requires the Get-PrivGPOZaurrLink function.
#>
[cmdletBinding()]
param(
[parameter(ParameterSetName = 'ADObject', ValueFromPipeline, ValueFromPipelineByPropertyName, Mandatory)][Microsoft.ActiveDirectory.Management.ADObject[]] $ADObject,
+17 -17
View File
@@ -1,52 +1,52 @@
function Get-GPOZaurrLinkInheritance {
<#
.SYNOPSIS
Short description
Retrieves the Group Policy Object (GPO) inheritance information for a given Active Directory object.
.DESCRIPTION
Long description
This function retrieves the inheritance information of Group Policy Objects (GPOs) for a specified Active Directory object. It provides details on how GPOs are linked and inherited by the object.
.PARAMETER ADObject
Parameter description
Specifies the Active Directory object for which to retrieve GPO inheritance information.
.PARAMETER Filter
Parameter description
Specifies the filter criteria for selecting the types of objects to include in the search. Default value includes 'organizationalUnit', 'domainDNS', and 'site' objects.
.PARAMETER SearchBase
Parameter description
Specifies the base distinguished name (DN) for the search operation.
.PARAMETER SearchScope
Parameter description
Specifies the scope of the search operation within Active Directory.
.PARAMETER Linked
Parameter description
Specifies the type of objects to include in the search. Valid values are 'Root', 'DomainControllers', and 'OrganizationalUnit'.
.PARAMETER Limited
Parameter description
Indicates whether to limit the search results. If specified, only a limited set of results will be returned.
.PARAMETER SkipDuplicates
Parameter description
Indicates whether to skip duplicate entries in the search results.
.PARAMETER GPOCache
Parameter description
Specifies a cache of Group Policy Objects to optimize performance.
.PARAMETER Forest
Target different Forest, by default current forest is used
Specifies the target forest to search for GPO inheritance information. By default, the current forest is used.
.PARAMETER ExcludeDomains
Exclude domain from search, by default whole forest is scanned
Specifies the domains to exclude from the search operation. By default, the entire forest is scanned.
.PARAMETER IncludeDomains
Include only specific domains, by default whole forest is scanned
Specifies the specific domains to include in the search operation. By default, the entire forest is scanned.
.PARAMETER ExtendedForestInformation
Parameter description
Specifies additional information about the forest to include in the search results.
.PARAMETER AsHashTable
Parameter description
Indicates whether to return the results as a hash table.
.PARAMETER Summary
Parameter description
Indicates whether to provide a summary of the GPO inheritance information.
.EXAMPLE
$Output = Get-GPOZaurrLinkInheritance -Summary
@@ -58,7 +58,7 @@ function Get-GPOZaurrLinkInheritance {
$Output[5].LinksObjects | Format-Table
.NOTES
This is based on Get-GPInheritance which isn't ideal and doesn't support sites. Get-GPOZaurrLink is better. Leaving in case I need it later on for private use only.
This function is an improved version of Get-GPInheritance and provides better support for sites. It is recommended for retrieving GPO inheritance information.
#>
[cmdletbinding(DefaultParameterSetName = 'All')]
param(
+47
View File
@@ -1,4 +1,51 @@
function Get-GPOZaurrLinkLoop {
<#
.SYNOPSIS
Retrieves Group Policy Object (GPO) links for Active Directory objects based on specified criteria.
.DESCRIPTION
This function retrieves GPO links for Active Directory objects based on the provided parameters. It allows searching for GPO links within specific sites, domains, or organizational units. The function can handle duplicates and provides flexibility in defining search criteria.
.PARAMETER ADObject
Specifies the Active Directory objects for which GPO links will be retrieved.
.PARAMETER CacheReturnedGPOs
A dictionary cache of returned Group Policy Objects for efficient processing.
.PARAMETER ForestInformation
Information about the forest structure and domains for targeted searches.
.PARAMETER Linked
Specifies the type of objects to search for GPO links. Valid values are 'All', 'Root', 'DomainControllers', 'Site', or 'OrganizationalUnit'.
.PARAMETER SearchBase
Specifies the base location for the search within Active Directory.
.PARAMETER SearchScope
Specifies the scope of the search within Active Directory.
.PARAMETER Filter
Specifies additional filters to apply during the search.
.PARAMETER SkipDuplicates
Indicates whether to skip duplicate GPO links during processing.
.PARAMETER Site
Specifies the site(s) to search for GPO links.
.EXAMPLE
Get-GPOZaurrLinkLoop -Site 'SiteA', 'SiteB' -ForestInformation $ForestInfo
Description:
Retrieves GPO links for sites 'SiteA' and 'SiteB' within the forest using the provided forest information.
.EXAMPLE
Get-GPOZaurrLinkLoop -SearchBase 'OU=Users,DC=contoso,DC=com' -SearchScope Subtree -Filter '(objectClass -eq "user")'
Description:
Retrieves GPO links for all user objects within the specified organizational unit 'Users' in the 'contoso.com' domain.
#>
[cmdletBinding()]
param(
[Microsoft.ActiveDirectory.Management.ADObject[]] $ADObject,
+23
View File
@@ -1,4 +1,27 @@
function Get-GitHubVersion {
<#
.SYNOPSIS
Retrieves the latest version information from a GitHub repository and compares it with the currently installed version of a specified cmdlet.
.DESCRIPTION
The Get-GitHubVersion function retrieves the latest version information from a specified GitHub repository and compares it with the version of a specified cmdlet. It then provides feedback on whether an update is available or if the installed version is up to date.
.PARAMETER Cmdlet
The name of the cmdlet to check for updates.
.PARAMETER RepositoryOwner
The owner of the GitHub repository where the releases are hosted.
.PARAMETER RepositoryName
The name of the GitHub repository.
.EXAMPLE
Get-GitHubVersion -Cmdlet "MyCmdlet" -RepositoryOwner "MyRepoOwner" -RepositoryName "MyRepo"
Description:
Retrieves the latest version information for "MyCmdlet" from the GitHub repository owned by "MyRepoOwner" with the name "MyRepo".
#>
[cmdletBinding()]
param(
[Parameter(Mandatory)][string] $Cmdlet,
+25
View File
@@ -1,4 +1,29 @@
function Get-LinksFromXML {
<#
.SYNOPSIS
Retrieves links from XML data.
.DESCRIPTION
This function retrieves links from XML data provided as input. It processes the XML data to extract relevant information about the links.
.PARAMETER GPOOutput
Specifies the XML data containing information about the links.
.PARAMETER Splitter
Specifies the delimiter to use when joining multiple links.
.PARAMETER FullObjects
Indicates whether to return full objects with additional properties for each link.
.EXAMPLE
Get-LinksFromXML -GPOOutput $xmlData -Splitter ";" -FullObjects
Retrieves links from the XML data $xmlData, separates them with a semicolon, and returns full objects for each link.
.EXAMPLE
Get-LinksFromXML -GPOOutput $xmlData -Splitter "/"
Retrieves links from the XML data $xmlData and joins them with a forward slash.
#>
[cmdletBinding()]
param(
[System.Xml.XmlElement[]] $GPOOutput,
+44
View File
@@ -1,4 +1,48 @@
function Get-PermissionsAnalysis {
<#
.SYNOPSIS
Analyzes permissions for a specified Group Policy Object (GPO) based on provided criteria.
.DESCRIPTION
This function analyzes permissions for a specified Group Policy Object (GPO) based on the given criteria. It checks for specific administrative groups, standard users, and well-known administrative groups to determine the type of permissions assigned.
.PARAMETER GPOPermissions
An array of GPO permissions to analyze.
.PARAMETER Type
Specifies the type of permissions to analyze. Valid values are 'WellKnownAdministrative', 'Administrative', 'AuthenticatedUsers', or 'Default'.
.PARAMETER PermissionType
The specific permission type to include in the analysis.
.PARAMETER Forest
Target different Forest, by default current forest is used.
.PARAMETER ExcludeDomains
Exclude domain from search, by default whole forest is scanned.
.PARAMETER IncludeDomains
Include only specific domains, by default whole forest is scanned.
.PARAMETER ExtendedForestInformation
Ability to provide Forest Information from another command to speed up processing.
.PARAMETER ADAdministrativeGroups
Specifies the Active Directory administrative groups to consider.
.EXAMPLE
Get-PermissionsAnalysis -GPOPermissions $GPOPermissions -Type 'Administrative' -PermissionType 'Read' -Forest 'Contoso' -IncludeDomains 'DomainA', 'DomainB'
Description:
Analyzes permissions for the specified GPOPermissions array, focusing on administrative groups with 'Read' permission in the 'Contoso' forest for 'DomainA' and 'DomainB'.
.EXAMPLE
Get-PermissionsAnalysis -GPOPermissions $GPOPermissions -Type 'WellKnownAdministrative' -PermissionType 'Write'
Description:
Analyzes permissions for the specified GPOPermissions array, targeting well-known administrative groups with 'Write' permission.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPOPermissions,
+29
View File
@@ -1,4 +1,33 @@
function Get-PrivGPOZaurrLink {
<#
.SYNOPSIS
Retrieves and processes Group Policy Object (GPO) links associated with a given Active Directory object.
.DESCRIPTION
This function retrieves and processes the GPO links associated with a specified Active Directory object. It parses the GPO links to extract relevant information such as distinguished name, canonical name, GUID, enforcement status, and enablement status.
.PARAMETER Object
The Active Directory object for which GPO links will be retrieved and processed.
.PARAMETER Limited
Indicates whether to provide limited information about the GPO links.
.PARAMETER GPOCache
A dictionary cache of Group Policy Objects for efficient processing.
.EXAMPLE
Get-PrivGPOZaurrLink -Object $ADObject
Description:
Retrieves and processes the GPO links associated with the specified Active Directory object.
.EXAMPLE
Get-PrivGPOZaurrLink -Object $ADObject -Limited
Description:
Retrieves limited information about the GPO links associated with the specified Active Directory object.
#>
[cmdletBinding()]
param(
[Microsoft.ActiveDirectory.Management.ADObject] $Object,
+65
View File
@@ -1,4 +1,69 @@
function Get-PrivPermission {
<#
.SYNOPSIS
Retrieves permissions for a specified Group Policy Object (GPO) based on various criteria.
.DESCRIPTION
This function retrieves permissions for a specified Group Policy Object (GPO) based on the provided parameters. It allows filtering by principal, permission type, and other criteria.
.PARAMETER GPO
Specifies the Group Policy Object (GPO) for which permissions will be retrieved.
.PARAMETER SecurityRights
Specifies the security rights to be evaluated for the GPO.
.PARAMETER Principal
Specifies the principal for which permissions will be retrieved.
.PARAMETER PrincipalType
Specifies the type of principal to filter by. Valid values are 'DistinguishedName', 'Name', 'NetbiosName', or 'Sid'.
.PARAMETER SkipWellKnown
Skips well-known principals when evaluating permissions.
.PARAMETER SkipAdministrative
Skips administrative principals when evaluating permissions.
.PARAMETER IncludeOwner
Includes the owner of the GPO in the permission results.
.PARAMETER IncludePermissionType
Specifies the permission types to include in the results.
.PARAMETER ExcludePermissionType
Specifies the permission types to exclude from the results.
.PARAMETER PermitType
Specifies the type of permissions to include. Valid values are 'Allow', 'Deny', or 'All'.
.PARAMETER ExcludePrincipal
Specifies principals to exclude from the results.
.PARAMETER ExcludePrincipalType
Specifies the type of principal to exclude. Valid values are 'DistinguishedName', 'Name', or 'Sid'.
.PARAMETER IncludeGPOObject
Includes the GPO object in the permission results.
.PARAMETER ADAdministrativeGroups
Specifies the Active Directory administrative groups to consider.
.PARAMETER Type
Specifies the type of principals to include. Valid values are 'AuthenticatedUsers', 'DomainComputers', 'Unknown', 'WellKnownAdministrative', 'NotWellKnown', 'NotWellKnownAdministrative', 'NotAdministrative', 'Administrative', or 'All'.
.PARAMETER ExtendedForestInformation
Specifies extended forest information to be used in evaluation.
.EXAMPLE
Get-PrivPermission -GPO $GPO -SecurityRights $SecurityRights -Principal 'Domain Admins' -PrincipalType 'Name' -PermitType 'Allow'
Retrieves permissions for the specified GPO where 'Domain Admins' have 'Allow' permissions.
.EXAMPLE
Get-PrivPermission -GPO $GPO -SecurityRights $SecurityRights -Principal 'S-1-5-21-3623811015-3361044348-30300820-1013' -PrincipalType 'Sid' -PermitType 'Deny'
Retrieves permissions for the specified GPO where the principal with the SID 'S-1-5-21-3623811015-3361044348-30300820-1013' has 'Deny' permissions.
#>
[cmdletBinding()]
param(
[Microsoft.GroupPolicy.Gpo] $GPO,
+51
View File
@@ -1,4 +1,51 @@
function Get-XMLGPO {
<#
.SYNOPSIS
Retrieves information from an XML representation of a Group Policy Object (GPO).
.DESCRIPTION
This function retrieves various details from an XML representation of a GPO, such as GPO name, domain name, links information, etc.
.PARAMETER XMLContent
The XML content representing the GPO.
.PARAMETER GPO
The Microsoft.GroupPolicy.Gpo object representing the GPO.
.PARAMETER PermissionsOnly
Indicates whether to retrieve only permissions information.
.PARAMETER OwnerOnly
Indicates whether to retrieve only owner information.
.PARAMETER ADAdministrativeGroups
A dictionary of Active Directory administrative groups.
.PARAMETER Splitter
The string used to split values in the output.
.PARAMETER ExcludeGroupPolicies
A dictionary of group policies to exclude.
.PARAMETER Type
An array of types to filter the output.
.PARAMETER LinksSummaryCache
A cache of links summary information.
.EXAMPLE
Get-XMLGPO -XMLContent $xml -GPO $gpo
Description:
Retrieves information from the XML content of a specific GPO.
.EXAMPLE
Get-XMLGPO -XMLContent $xml -GPO $gpo -PermissionsOnly
Description:
Retrieves only the permissions information from the XML content of a specific GPO.
#>
[cmdletBinding()]
param(
[XML] $XMLContent,
@@ -173,12 +220,14 @@
# if there are any, then we can't say that GPO is empty, and they are not visible in the XML
$GPFFile = $false
$FilesCount = 0
$TotalSize = 0
Get-ChildItem -LiteralPath $SysvolGpoPath -Recurse -ErrorAction SilentlyContinue -File | ForEach-Object {
if ($_.Extension -eq '.gpf') {
#Write-Warning -Message "Get-XMLGPO - GPO [$DisplayName/$DomainName] has no data in XML, but it contains GPF files. Excluding from empty GPO list."
$GPFFile = $true
}
$FilesCount++
$TotalSize += $_.Length
}
if ($ComputerSettingsAvailable -eq $false -and $UserSettingsAvailable -eq $false -and $GPFFile -eq $false) {
@@ -316,6 +365,8 @@
'Problem' = $Problem
'ApplyPermission' = $null
'Exclude' = $Exclude
'SizeMB' = [Math]::Round($TotalSize / 1MB, 2)
'Size' = $TotalSize
'Description' = $GPO.Description
'ComputerPolicies' = $XMLContent.GPO.Computer.ExtensionData.Name -join ", "
'UserPolicies' = $XMLContent.GPO.User.ExtensionData.Name -join ", "
+28
View File
@@ -1,4 +1,32 @@
function Get-XMLNestedRegistry {
<#
.SYNOPSIS
Retrieves registry settings from XML data and formats them for output.
.DESCRIPTION
This function retrieves registry settings from XML data and formats them for output. It can either provide a limited set of information or the full details of each registry setting.
.PARAMETER GPO
The Group Policy Object (GPO) associated with the registry settings.
.PARAMETER DataSet
An array of XML elements containing the registry settings.
.PARAMETER Collection
The name of the collection of registry settings.
.PARAMETER Limited
Indicates whether to provide limited information about each registry setting.
.EXAMPLE
Get-XMLNestedRegistry -GPO $GPO -DataSet $DataSet -Collection "SoftwareSettings" -Limited
Retrieves limited information about the registry settings in the "SoftwareSettings" collection.
.EXAMPLE
Get-XMLNestedRegistry -GPO $GPO -DataSet $DataSet -Collection "WindowsSettings"
Retrieves full details of the registry settings in the "WindowsSettings" collection.
#>
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
+1 -1
View File
@@ -18,7 +18,7 @@
Solution = {
foreach ($Key in $Script:Reporting['GPOAnalysis']['Data'].Keys) {
New-HTMLTab -Name $Key {
New-HTMLTable -DataTable $Script:Reporting['GPOAnalysis']['Data'][$Key] -Filtering -Title $Key
New-HTMLTable -DataTable $Script:Reporting['GPOAnalysis']['Data'][$Key] -Filtering -Title $Key -ScrollX
}
}
if ($Script:Reporting['GPOAnalysis']['WarningsAndErrors']) {
@@ -80,7 +80,7 @@
"As GPOs can be inherited by default, they can also be blocked, if required using the Block Inheritance. "
"If the Block Inheritance setting is enabled, the inheritance of group policy setting is blocked. "
"This setting is mostly used when the OU contains users or computers that require different settings than what is applied to the domain level. "
"Unfortunetly blocking inheritance can have serious security consequences. "
"Unfortunately blocking inheritance can have serious security consequences. "
)
New-HTMLText -Text @(
'As it stands currently there are ',
@@ -154,14 +154,14 @@
New-TableCondition -Name 'ComputersCount' -Value 0
} -BackgroundColor Salmon -FailBackgroundColor Amber -HighlightHeaders 'UsersCount', 'ComputersCount'
New-TableColumnOption -Hidden $true -ColumnIndex 8
} -PagingOptions 5, 10, 20, 30, 40, 50 -ExcludeProperty GroupPolicies
} -PagingOptions 5, 10, 20, 30, 40, 50 -ExcludeProperty GroupPolicies -ScrollX
}
New-HTMLSection -Name 'Group Policies affecting objects in Organizational Units with Blocked Inheritance' {
New-HTMLTable -DataTable $Script:Reporting['GPOBlockedInheritance']['Data'].GroupPolicies -Filtering {
New-TableCondition -Name 'Enabled' -Value $true -BackgroundColor SpringGreen -FailBackgroundColor Salmon
New-TableCondition -Name 'Enforced' -Value $true -BackgroundColor Amber -FailBackgroundColor AirForceBlue
New-TableCondition -Name 'LinkedDirectly' -Value $true -BackgroundColor Amber -FailBackgroundColor AirForceBlue
} -PagingOptions 5, 10, 20, 30, 40, 50 -DataTableID 'TableWithGroupPoliciesBlockedInheritance'
} -PagingOptions 5, 10, 20, 30, 40, 50 -DataTableID 'TableWithGroupPoliciesBlockedInheritance' -ScrollX
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix - Organizational Units with Group Policy Blocked Inheritance' {
+1 -1
View File
@@ -76,7 +76,7 @@ $GPOZaurrBrokenLink = [ordered] @{
New-HTMLSection -Name 'Group Policy Broken Links' {
New-HTMLTable -DataTable $Script:Reporting['GPOBrokenLink']['Data'] -Filtering {
} -PagingOptions 10, 20, 30, 40, 50
} -PagingOptions 7, 15, 30, 45, 60 -ScrollX
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to remove Broken Links' {
+4 -4
View File
@@ -40,7 +40,7 @@
New-HTMLListItem -Text 'Inconsistent top level permissions: ', $Script:Reporting['GPOConsistency']['Variables']['Inconsistent'] -FontWeight normal, bold
New-HTMLListItem -Text "Inconsistent inherited permissions: ", $Script:Reporting['GPOConsistency']['Variables']['InconsistentInside'] -FontWeight normal, bold
} -FontSize 10pt
New-HTMLText -FontSize 10pt -Text 'Having incosistent permissions on AD in comparison to those on SYSVOL can lead to uncontrolled ability to modify them.'
New-HTMLText -FontSize 10pt -Text 'Having inconsistent permissions on AD in comparison to those on SYSVOL can lead to uncontrolled ability to modify them.'
New-HTMLChart {
New-ChartLegend -Names 'Bad', 'Good' -Color PaleGreen, Salmon
New-ChartBarOptions -Type barStacked
@@ -66,7 +66,7 @@
New-HTMLListItem -Text 'Inconsistent top level permissions: ', $Script:Reporting['GPOConsistency']['Variables']['Inconsistent'] -FontWeight normal, bold
New-HTMLListItem -Text "Inconsistent inherited permissions: ", $Script:Reporting['GPOConsistency']['Variables']['InconsistentInside'] -FontWeight normal, bold
} -FontSize 10pt
New-HTMLText -FontSize 10pt -Text 'Having incosistent permissions on AD in comparison to those on SYSVOL can lead to uncontrolled ability to modify them. Please notice that if ', `
New-HTMLText -FontSize 10pt -Text 'Having inconsistent permissions on AD in comparison to those on SYSVOL can lead to uncontrolled ability to modify them. Please notice that if ', `
' Not available ', 'is visible in the table you should first fix related, more pressing issue, before fixing permissions inconsistency.' -FontWeight normal, bold, normal
}
Solution = {
@@ -91,7 +91,7 @@
New-HTMLTableCondition -Name 'ACLConsistentInside' -Value $true -BackgroundColor PaleGreen -TextTransform capitalize -ComparisonType string
New-HTMLTableCondition -Name 'ACLConsistent' -Value 'Not available' -BackgroundColor Crimson -ComparisonType string
New-HTMLTableCondition -Name 'ACLConsistentInside' -Value 'Not available' -BackgroundColor Crimson -ComparisonType string
} -PagingOptions 10, 20, 30, 40, 50
} -PagingOptions 7, 15, 30, 45, 60 -ScrollX -ExcludeProperty 'UserVersion', 'ComputerVersion', 'WmiFilter', 'ACLConsistentInsideDetails'
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix - Permissions Consistency' {
@@ -145,7 +145,7 @@
}
New-HTMLWizardStep -Name 'Fix inconsistent downlevel permissions' {
New-HTMLText -Text @(
"Unfortunetly this step is manual until automation is developed. "
"Unfortunately this step is manual until automation is developed. "
"If there are inconsistent permissions found inside GPO one has to fix them manually by going into SYSVOL and making sure inheritance is enabled, and that permissions are consistent across all files."
"Please keep in mind that it's possible inconsistent downlevel permissions fix will not be required once the top level fix is applied. "
"Rerun report to find out if you've just fixed top-level permissions. "
+3 -3
View File
@@ -29,7 +29,7 @@
"CNF objects, Conflict objects or Duplicate Objects are created in Active Directory when there is simultaneous creation of an AD object under the same container "
"on two separate Domain Controllers near about the same time or before the replication occurs. "
"This results in a conflict and the same is exhibited by a CNF (Duplicate) object. "
"While it doesn't nessecary has a huge impact on Active Directory it's important to keep Active Directory in proper, healthy state. "
"While it doesn't nessecarily have a huge impact on Active Directory, it's important to keep Active Directory in proper, healthy state. "
}
New-HTMLText -Text 'As it stands currently there are ', $Script:Reporting['GPODuplicates']['Data'].Count, ' CNF (Duplicate) Group Policy objects to be deleted.' -FontSize 10pt -FontWeight normal, bold, normal
}
@@ -48,7 +48,7 @@
New-HTMLSection -Name 'Group Policy CNF (Duplicate) Objects' {
New-HTMLTable -DataTable $Script:Reporting['GPODuplicates']['Data'] -Filtering {
} -PagingOptions 10, 20, 30, 40, 50
} -PagingOptions 7, 15, 30, 45, 60 -ScrollX
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix - Remove duplicate (CNF) objects' {
@@ -120,4 +120,4 @@
}
}
}
}
}
+6 -1
View File
@@ -16,7 +16,12 @@
}
Solution = {
New-HTMLTable -DataTable $Script:Reporting['GPOFiles']['Data'] -Filtering
New-HTMLTable -DataTable $Script:Reporting['GPOFiles']['Data'] -Filtering -ScrollX -PagingOptions 7, 15, 30, 45, 60 {
New-HTMLTableCondition -Name 'SuggestedAction' -Value 'Requires verification' -BackgroundColor YellowOrange -ComparisonType string
New-HTMLTableCondition -Name 'SuggestedAction' -Value 'Consider deleting' -BackgroundColor Salmon -ComparisonType string
New-HTMLTableCondition -Name 'SuggestedAction' -Value 'GPO requires cleanup' -BackgroundColor RedRobin -ComparisonType string
New-HTMLTableCondition -Name 'SuggestedAction' -Value 'Skip assesment' -BackgroundColor LightGreen -ComparisonType string
}
if ($Script:Reporting['GPOFiles']['WarningsAndErrors']) {
New-HTMLSection -Name 'Warnings & Errors to Review' {
New-HTMLTable -DataTable $Script:Reporting['GPOFiles']['WarningsAndErrors'] -Filtering {
+11 -11
View File
@@ -1,12 +1,12 @@
$GPOZaurrGPORedirects = [ordered] @{
Name = 'Group Policies With Redirected SYSVOL'
Enabled = $false
ActionRequired = $null
Data = $null
Execute = {
Name = 'Group Policies With Redirected SYSVOL'
Enabled = $false
ActionRequired = $null
Data = $null
Execute = {
Get-GPOZaurrRedirect -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains
}
Processing = {
Processing = {
foreach ($GPO in $Script:Reporting['GPORedirect']['Data']) {
$Script:Reporting['GPORedirect']['Variables']['GPOTotal']++
if ($GPO.IsCorrect -eq $true) {
@@ -21,15 +21,15 @@
$Script:Reporting['GPORedirect']['ActionRequired'] = $false
}
}
Variables = @{
Variables = @{
GPOTotal = 0
GPOIsCorrect = 0
GPOIsNotCorrect = 0
}
Overview = {
Overview = {
}
Summary = {
Summary = {
New-HTMLText -TextBlock {
"Group Policies are stored in Active Directory and SYSVOL. SYSVOL is a folder shared by the domain controllers to hold its logon scripts, "
"group policy data, and other domain-wide data which needs to be available anywhere there is a domain controller. "
@@ -49,7 +49,7 @@
"If you notice any GPO with redirect, you should investigate it. "
} -FontSize 10pt -LineBreak
}
Solution = {
Solution = {
New-HTMLSection -Invisible {
New-HTMLPanel {
& $Script:GPOConfiguration['GPORedirect']['Summary']
@@ -65,7 +65,7 @@
New-HTMLSection -Name 'Group Policies showing redirects (if any)' {
New-HTMLTable -DataTable $Script:Reporting['GPORedirect']['Data'] -Filtering {
New-HTMLTableCondition -Name 'IsCorrect' -Value $false -BackgroundColor Salmon -ComparisonType bool -FailBackgroundColor MintGreen -HighlightHeaders 'IsCorrect', 'Path', 'ExpectedPath'
}
} -ScrollX -PagingOptions 7, 15, 30, 45, 60
}
if ($Script:Reporting['GPORedirect']['WarningsAndErrors']) {
New-HTMLSection -Name 'Warnings & Errors to Review' {
+1 -1
View File
@@ -68,7 +68,7 @@
New-HTMLTableCondition -Name 'LinksCount' -Value 0 -ComparisonType number
New-HTMLTableCondition -Name 'LinksEnabledCount' -Value 0 -ComparisonType number
} -BackgroundColor Salmon -FailBackgroundColor Goldenrod -Logic OR -HighlightHeaders 'LinksCount', 'LinksEnabledCount', 'DisplayName', 'DomainName'
}
} -ScrollX -PagingOptions 7, 15, 30, 45, 60
}
if ($Script:Reporting['GPOUpdates']['WarningsAndErrors']) {
New-HTMLSection -Name 'Warnings & Errors to Review' {
+3 -1
View File
@@ -16,7 +16,9 @@ $GPOZaurrLinks = [ordered] @{
}
Solution = {
New-HTMLTable -DataTable $Script:Reporting['GPOLinks']['Data'] -Filtering
New-HTMLTable -DataTable $Script:Reporting['GPOLinks']['Data'] -Filtering -ScrollX -PagingOptions 7, 15, 30, 45, 60 -ExcludeProperty 'LinksObjects' {
New-HTMLTableCondition -Name 'Linked' -Value 'True' -BackgroundColor PaleGreen -ComparisonType string -FailBackgroundColor Salmon
}
if ($Script:Reporting['GPOLinks']['WarningsAndErrors']) {
New-HTMLSection -Name 'Warnings & Errors to Review' {
New-HTMLTable -DataTable $Script:Reporting['GPOLinks']['WarningsAndErrors'] -Filtering {
+1 -1
View File
@@ -388,7 +388,7 @@
New-HTMLTableCondition -Name 'UserProblem' -Value $false -BackgroundColor SpringGreen -ComparisonType string
New-HTMLTableCondition -Name 'ComputerOptimized' -Value $true -BackgroundColor SpringGreen -ComparisonType string
New-HTMLTableCondition -Name 'UserOptimized' -Value $true -BackgroundColor SpringGreen -TextTransform capitalize -ComparisonType string
} -PagingOptions 10, 20, 30, 40, 50
} -PagingOptions 7, 15, 30, 45, 60 -ScrollX -ExcludeProperty 'LinksObjects', 'GPOObject', 'ACL', 'Size'
}
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
+5 -5
View File
@@ -30,11 +30,11 @@
Summary = {
New-HTMLText -FontSize 10pt -TextBlock {
"Group Policies can become broken for various reasons. One of the common reasons is when GPOs are created and then deleted without being properly removed from Active Directory. "
"In other cases it can be due to replication issues, or simply due to corruption. "
"In other cases, it can be due to replication issues, or simply due to corruption. "
"This can lead to GPOs not being applied as expected, or not being applied at all. "
"If random files are missing from GPOs it's important to fix them to ensure that GPOs are applied as expected. "
"If random files are missing from GPOs, it's important to fix them to ensure that GPOs are applied as expected. "
"This report provides you with list of GPOs that have missing files. "
"Usually once files are missing it's best to restore them from backup (if available) or remove given section completly. "
"Once files are missing, it's usually best to restore them from backup (if available) or remove the given section completely. "
"It's not possible to restore missing files from Active Directory directly or manually. "
} -LineBreak
New-HTMLText -Text 'As it stands currently there are ', $Script:Reporting['GPOBrokenPartially']['Variables']['RequireFixing'], ' error requring fixing. ' -FontSize 10pt -FontWeight normal, bold, normal
@@ -54,7 +54,7 @@
New-HTMLSection -Name 'Group Policy Missing Files' {
New-HTMLTable -DataTable $Script:Reporting['GPOBrokenPartially']['Data'] -Filtering {
New-HTMLTableCondition -Name 'ErrorCount' -Value 0 -BackgroundColor LightGreen -ComparisonType number -FailBackgroundColor Salmon -HighlightHeaders 'ErrorCount', 'ErrorCategory', 'ErrorDetails'
} -PagingOptions 10, 20, 30, 40, 50
} -PagingOptions 7, 15, 30, 45, 60 -ScrollX
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix - Remove duplicate (CNF) objects' {
@@ -112,4 +112,4 @@
}
}
}
}
}
+1 -1
View File
@@ -135,7 +135,7 @@
New-HTMLTableCondition -Name 'OwnerType' -Value "WellKnownAdministrative" -BackgroundColor LightGreen -ComparisonType string -Operator eq
New-HTMLTableCondition -Name 'Status' -Value "OK" -BackgroundColor LightGreen -ComparisonType string -Operator eq
New-HTMLTableCondition -Name 'Status' -Value "OK" -BackgroundColor Salmon -ComparisonType string -Operator ne
}
} -ScrollX -PagingOptions 7, 15, 30, 45, 60
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix NetLogon Owners ' {
@@ -146,7 +146,7 @@
New-HTMLTableCondition -Name 'Status' -Value "Review permission required" -BackgroundColor PaleGoldenrod -ComparisonType string -Operator eq
New-HTMLTableCondition -Name 'Status' -Value "Removal permission required" -BackgroundColor Salmon -ComparisonType string -Operator eq -Row
New-HTMLTableCondition -Name 'Status' -Value "OK" -BackgroundColor LightGreen -ComparisonType string -Operator eq
}
} -ScrollX -PagingOptions 7, 15, 30, 45, 60
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix NetLogon Permissions ' {
@@ -133,6 +133,7 @@
}
}
New-HTMLSection -Name 'Group Policy Organizational Units' {
# Not adding ScrollX to hide Objects, as it can get quite big
New-HTMLTable -DataTable $Script:Reporting['GPOOrganizationalUnit']['Data'] -Filtering {
New-TableHeader -ResponsiveOperations none -Names 'GPONames', 'Objects'
New-HTMLTableCondition -Name 'Status' -ComparisonType string -Value 'Unlink GPO, Delete OU' -BackgroundColor Salmon -Row
@@ -141,7 +142,7 @@
New-HTMLTableCondition -Name 'Status' -ComparisonType string -Value 'OK' -BackgroundColor LightGreen -Row
New-HTMLTableCondition -Name 'Status' -ComparisonType string -Value 'Excluded' -BackgroundColor DeepSkyBlue -Row
New-HTMLTableCondition -Name 'Status' -ComparisonType string -Value 'Excluded, Default OU' -BackgroundColor DeepSkyBlue -Row
} -PagingOptions 10, 20, 30, 40, 50 -ExcludeProperty GPO
} -PagingOptions 7, 15, 30, 45, 60 -ExcludeProperty GPO
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix Group Organizational Units' {
@@ -257,7 +258,7 @@
New-HTMLTable -DataTable $Script:Reporting['GPOOrganizationalUnit']['WarningsAndErrors'] -Filtering {
New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row
New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row
} -PagingOptions 10, 20, 30, 40, 50
} -PagingOptions 7, 15, 30, 45, 60
}
}
}
+2 -1
View File
@@ -128,7 +128,8 @@
New-HTMLTableCondition -Name 'Status' -Value "Not available on SYSVOL" -BackgroundColor LightCoral -ComparisonType string
New-HTMLTableCondition -Name 'Status' -Value "ObjectClass issue" -BackgroundColor MediumOrchid -ComparisonType string
New-HTMLTableCondition -Name 'Status' -Value "Permissions issue" -BackgroundColor MediumVioletRed -ComparisonType string -Color White
} -PagingOptions 10, 20, 30, 40, 50
New-HTMLTableCondition -Name 'Status' -Value "Exists" -BackgroundColor LightGreen -ComparisonType string
} -PagingOptions 7, 15, 30, 45, 60 -ScrollX
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix - Not available on SYSVOL / Active Directory / ObjectClass issue' {
+2 -2
View File
@@ -184,7 +184,7 @@
#New-HTMLTableCondition -Name 'Status' -Value 'Administrative, Inconsistent, Approved' -BackgroundColor Salmon -ComparisonType string -Row
# New-HTMLTableCondition -Name 'Status' -Value 'NotAdministrative, Inconsistent, Approved' -BackgroundColor Salmon -ComparisonType string -Row
} -PagingOptions 10, 20, 30, 40, 50
} -PagingOptions 7, 15, 30, 45, 60 -ScrollX
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix Group Policy Owners' {
@@ -307,7 +307,7 @@
New-HTMLTable -DataTable $Script:Reporting['GPOOwners']['WarningsAndErrors'] -Filtering {
New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row
New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row
} -PagingOptions 10, 20, 30, 40, 50
} -PagingOptions 7, 15, 30, 45, 60
}
}
}
+1 -1
View File
@@ -16,7 +16,7 @@
}
Solution = {
New-HTMLTable -DataTable $Script:Reporting['GPOPassword']['Data'] -Filtering
New-HTMLTable -DataTable $Script:Reporting['GPOPassword']['Data'] -Filtering -ScrollX -PagingOptions 7, 15, 30, 45, 60
if ($Script:Reporting['GPOPassword']['WarningsAndErrors']) {
New-HTMLSection -Name 'Warnings & Errors to Review' {
@@ -99,7 +99,7 @@
New-HTMLSection -Name 'Group Policy Administrative Users Analysis' {
New-HTMLTable -DataTable $Script:Reporting['GPOPermissionsAdministrative']['Data'].PermissionsAnalysis -Filtering {
# New-HTMLTableCondition -Name 'Permission' -Value '' -BackgroundColor Salmon -ComparisonType string -Row
} -PagingOptions 7, 15, 30, 45, 60
} -PagingOptions 7, 15, 30, 45, 60 -ScrollX
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix Group Policy Administrative Users' {
@@ -202,7 +202,7 @@
New-HTMLTable -DataTable $Script:Reporting['GPOPermissionsAdministrative']['WarningsAndErrors'] -Filtering {
New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row
New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row
} -PagingOptions 10, 20, 30, 40, 50
} -PagingOptions 7, 15, 30, 45, 60
}
}
}
@@ -185,7 +185,7 @@
} -FontSize 10pt
New-HTMLText -FontSize 10pt -Text @(
"Unfortunetly it's not as simple as it sounds. While checking for permissions mostly works fine, it's possible a Group Policy has totally removed account permissions from being able to asses any of it. ",
"Unfortunately it's not as simple as it sounds. While checking for permissions mostly works fine, it's possible a Group Policy has totally removed account permissions from being able to asses any of it. ",
"The account we're using "
"$($Env:USERDOMAIN)\$($Env:USERNAME.ToUpper())",
" may simply not have enough permisions to properly asses permissions for a GPO. "
@@ -265,7 +265,7 @@
New-HTMLText -Text "Fourth problem relates to UNKNOWN SID" -FontSize 10pt -FontWeight bold -TextDecoration underline -Alignment center
New-HTMLText -FontSize 10pt -TextBlock {
"Sometimes groups or users are deleted in Active Directory and unfortunetly their permissions are not cleaned automatically. "
"Sometimes groups or users are deleted in Active Directory and Unfortunately their permissions are not cleaned automatically. "
"Those are left in-place and stay there forever until removed. "
} -LineBreak
@@ -309,7 +309,7 @@
New-HTMLSection -Name 'Group Policy Visibility Analysis' {
New-HTMLTable -DataTable $Script:Reporting['GPOPermissions']['Data'].PermissionsIssues -Filtering {
New-HTMLTableCondition -Name 'PermissionIssue' -Value $true -BackgroundColor Salmon -ComparisonType string -Row
} -PagingOptions 7, 15, 30, 45, 60 -DefaultSortColumn PermissionIssue -DefaultSortOrder Descending
} -PagingOptions 7, 15, 30, 45, 60 -DefaultSortColumn PermissionIssue -DefaultSortOrder Descending -ScrollX
}
New-HTMLSection -Name 'Group Policy Permissions Analysis' {
New-HTMLContainer {
@@ -344,7 +344,7 @@
New-HTMLTableCondition -Name 'EnterpriseAdmins' -Value 'True' -BackgroundColor Salmon -ComparisonType string -Operator ne
New-TableEvent -TableID 'GPOPermissionsAll' -SourceColumnName 'GUID' -TargetColumnID 1 # TargetColumnID 1 eq GUID on the other table
} -PagingOptions 7, 15, 30, 45, 60
} -PagingOptions 7, 15, 30, 45, 60 -ScrollX
}
}
New-HTMLSection -Name 'All Permissions' {
@@ -355,7 +355,7 @@
New-HTMLTableCondition -Name 'Permission' -Value 'GpoApply' -BackgroundColor Orange -ComparisonType string
New-HTMLTableCondition -Name 'Permission' -Value 'GpoRead' -BackgroundColor MediumSpringGreen -ComparisonType string -Operator eq
New-HTMLTableCondition -Name 'PrincipalSidType' -Value 'Unknown' -BackgroundColor Salmon -ComparisonType string -Operator eq
} -PagingOptions 7, 15, 30, 45, 60 -DataTableID 'GPOPermissionsAll'
} -PagingOptions 7, 15, 30, 45, 60 -DataTableID 'GPOPermissionsAll' -ScrollX -ExcludeProperty 'GPOSecurity', 'GPOSecurityPermissionItem', 'GPOObject'
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix Group Policy Administrative Users' {
+3 -3
View File
@@ -151,12 +151,12 @@
New-HTMLSection -Name 'Group Policy Authenticated Users Analysis' {
New-HTMLTable -DataTable $Script:Reporting['GPOPermissionsRead']['Data'].Permissions -Filtering {
New-HTMLTableCondition -Name 'Permission' -Value '' -BackgroundColor Salmon -ComparisonType string -Row
} -PagingOptions 7, 15, 30, 45, 60
} -PagingOptions 7, 15, 30, 45, 60 -ScrollX
}
New-HTMLSection -Name 'Group Policy Issues Assesment' {
New-HTMLTable -DataTable $Script:Reporting['GPOPermissionsRead']['Data'].Issues -Filtering {
New-HTMLTableCondition -Name 'PermissionIssue' -Value $true -BackgroundColor Salmon -ComparisonType string -Row
} -PagingOptions 7, 15, 30, 45, 60 -DefaultSortColumn PermissionIssue -DefaultSortOrder Descending
} -PagingOptions 7, 15, 30, 45, 60 -DefaultSortColumn PermissionIssue -DefaultSortOrder Descending -ScrollX
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix Group Policy Authenticated Users' {
@@ -259,7 +259,7 @@
New-HTMLTable -DataTable $Script:Reporting['GPOPermissionsRead']['WarningsAndErrors'] -Filtering {
New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row
New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row
} -PagingOptions 10, 20, 30, 40, 50
} -PagingOptions 7, 15, 30, 45, 60
}
}
}
+1 -1
View File
@@ -16,7 +16,7 @@
}
Solution = {
New-HTMLTable -DataTable $Script:Reporting['GPOPermissionsRoot']['Data'] -Filtering
New-HTMLTable -DataTable $Script:Reporting['GPOPermissionsRoot']['Data'] -Filtering -PagingOptions 7, 15, 30, 45, 60 -ScrollX
if ($Script:Reporting['GPOPermissionsRoot']['WarningsAndErrors']) {
New-HTMLSection -Name 'Warnings & Errors to Review' {
New-HTMLTable -DataTable $Script:Reporting['GPOPermissionsRoot']['WarningsAndErrors'] -Filtering {
@@ -71,7 +71,7 @@
New-HTMLSection -Name 'Group Policy Unknown Permissions Analysis' {
New-HTMLTable -DataTable $Script:Reporting['GPOPermissionsUnknown']['Data'] -Filtering {
New-HTMLTableCondition -Name 'Permission' -Value '' -BackgroundColor Salmon -ComparisonType string -Row
} -PagingOptions 7, 15, 30, 45, 60
} -PagingOptions 7, 15, 30, 45, 60 -ScrollX
}
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
New-HTMLSection -Name 'Steps to fix Group Policy Unknown Permissions' {
@@ -174,7 +174,7 @@
New-HTMLTable -DataTable $Script:Reporting['GPOPermissionsUnknown']['WarningsAndErrors'] -Filtering {
New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row
New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row
} -PagingOptions 10, 20, 30, 40, 50
} -PagingOptions 7, 15, 30, 45, 60
}
}
}
+15 -1
View File
@@ -14,9 +14,23 @@
}
Overview = {
}
Summary = {
New-HTMLText -TextBlock {
"This report shows legacy ADM files in SYSVOL. These files are no longer used and can be safely removed. "
"Before 'adm' files were replaced by 'admx' files, they were stored in the SYSVOL share, directly per each GPO. "
"This report will help you identify and remove these files. "
}
}
Solution = {
New-HTMLTable -DataTable $Script:Reporting['SysVolLegacyFiles']['Data'] -Filtering
New-HTMLSection -Invisible {
New-HTMLPanel {
& $Script:GPOConfiguration['SysVolLegacyFiles']['Summary']
}
}
New-HTMLSection -Name "Legacy ADM Files in SYSVOL" {
New-HTMLTable -DataTable $Script:Reporting['SysVolLegacyFiles']['Data'] -Filtering -PagingOptions 7, 15, 30, 45, 60 -ScrollX
}
if ($Script:Reporting['SysVolLegacyFiles']['WarningsAndErrors']) {
New-HTMLSection -Name 'Warnings & Errors to Review' {
New-HTMLTable -DataTable $Script:Reporting['SysVolLegacyFiles']['WarningsAndErrors'] -Filtering {
+22
View File
@@ -1,4 +1,26 @@
function New-GPOZaurrExclusions {
<#
.SYNOPSIS
Creates exclusion code for Group Policy Objects (GPOs) in Zaurr format.
.DESCRIPTION
The New-GPOZaurrExclusions function generates exclusion code for GPOs in Zaurr format based on the provided exclusions. It supports both script block and array types of exclusions.
.PARAMETER Exclusions
Specifies the exclusions to be included in the generated code. This parameter accepts script blocks or arrays of exclusion items.
.EXAMPLE
$exclusions = {
# Exclude specific settings
'Setting1',
'Setting2'
}
New-GPOZaurrExclusions -Exclusions $exclusions
.EXAMPLE
$exclusions = @('Setting1', 'Setting2')
New-GPOZaurrExclusions -Exclusions $exclusions
#>
[cmdletBinding()]
param(
[alias('ExcludeGroupPolicies', 'ExclusionsCode', 'ExclusionsArray')][Parameter(Position = 1)][object] $Exclusions
+18
View File
@@ -1,4 +1,22 @@
function New-GPOZaurrReportConsole {
<#
.SYNOPSIS
Generates a detailed report of Group Policy Objects (GPO) applied to a computer and user.
.DESCRIPTION
This function provides a comprehensive overview of the Group Policy Objects (GPO) applied to a specific computer and user. It includes information such as last applied time, computer details, domain name, organizational unit, site, GPO types, slow link status, applied GPOs, and denied GPOs.
.PARAMETER Results
An IDictionary containing the results of Group Policy Object queries for both computer and user.
.PARAMETER ComputerName
The name of the computer for which the GPO report is generated.
.EXAMPLE
New-GPOZaurrReportConsole -Results $Results -ComputerName "MyComputer"
Generates a detailed report of Group Policy Objects applied to the computer named "MyComputer".
#>
[cmdletBinding()]
param(
[System.Collections.IDictionary] $Results,
+31
View File
@@ -1,4 +1,35 @@
function New-GPOZaurrReportHTML {
<#
.SYNOPSIS
Generates an HTML report based on Group Policy information.
.DESCRIPTION
The New-GPOZaurrReportHTML function generates an HTML report based on the Group Policy information provided. It includes detailed sections for general computer information, CPU and RAM details, operating system information, and disk information.
.PARAMETER Support
Specifies the Group Policy support information to be included in the report.
.PARAMETER Path
Specifies the path where the HTML report will be saved. If not provided, a temporary file will be created.
.PARAMETER Online
Indicates whether to generate an online report.
.PARAMETER Open
Indicates whether to open the generated report after creation.
.EXAMPLE
New-GPOZaurrReportHTML -Support $GPOInfo -Path "C:\Reports\GPOReport.html"
Generates an HTML report based on the Group Policy information in $GPOInfo and saves it to the specified path.
.EXAMPLE
New-GPOZaurrReportHTML -Support $GPOInfo -Online
Generates an online HTML report based on the Group Policy information in $GPOInfo.
.EXAMPLE
New-GPOZaurrReportHTML -Support $GPOInfo -Path "C:\Reports\GPOReport.html" -Open
Generates an HTML report based on the Group Policy information in $GPOInfo, saves it to the specified path, and opens the report after creation.
#>
[cmdletBinding()]
param(
[System.Collections.IDictionary] $Support,
+28
View File
@@ -1,4 +1,32 @@
function New-HTMLReportAll {
<#
.SYNOPSIS
Generates an HTML report based on specified parameters.
.DESCRIPTION
This function generates an HTML report with customizable content based on the provided parameters. It supports generating standard reports and can be used for various reporting purposes.
.PARAMETER FilePath
Specifies the file path where the HTML report will be saved.
.PARAMETER Online
Indicates whether the report should be generated online.
.PARAMETER HideHTML
Hides the HTML content of the report if specified.
.PARAMETER Type
Specifies the type of report to generate.
.EXAMPLE
New-HTMLReportAll -FilePath "C:\Reports\Report.html" -Online -Type "Summary"
Generates an HTML report with a summary of data and saves it to the specified file path.
.EXAMPLE
New-HTMLReportAll -FilePath "C:\Reports\FullReport.html" -Type "Detailed"
Generates a detailed HTML report and saves it to the specified file path.
#>
[CmdletBinding()]
param(
[string] $FilePath,
+31 -1
View File
@@ -1,4 +1,34 @@
function New-HTMLReportWithSplit {
<#
.SYNOPSIS
Creates an HTML report with the option to split it into multiple files for easier viewing.
.DESCRIPTION
This function generates an HTML report based on the provided parameters. It also allows splitting the report into multiple files for better organization and readability.
.PARAMETER FilePath
Specifies the path where the HTML report will be saved.
.PARAMETER Online
Indicates whether the report should be generated for online viewing.
.PARAMETER HideHTML
Hides the HTML report file after generation.
.PARAMETER CurrentReport
Specifies the type of the current report to generate.
.EXAMPLE
New-HTMLReportWithSplit -FilePath "C:\Reports\GPO_Report.html" -Online -HideHTML -CurrentReport "Security"
Generates an HTML report for the "Security" report type and saves it to the specified file path. The report is optimized for online viewing and the HTML file is hidden after generation.
.EXAMPLE
New-HTMLReportWithSplit -FilePath "C:\Reports\All_Reports.html" -CurrentReport "All"
Generates an HTML report for all available report types and saves it to the specified file path.
#>
[cmdletBinding()]
param(
[string] $FilePath,
@@ -19,7 +49,7 @@
# or if current report is given and it matches the current report type which works for split reprots
if ($Script:GPOConfiguration[$T].Enabled -eq $true -and ((-not $CurrentReport) -or ($CurrentReport -and $CurrentReport -eq $T))) {
Write-Color -Text '[i]', '[HTML ] ', "Generating HTML report ($FilePath) for $T with split reports" -Color Yellow, DarkGray, Yellow
New-HTML -Author 'Przemysław Kłys' -TitleText 'GPOZaurr Report' {
New-HTML -Author 'Przemysław Kłys @ Evotec' -TitleText 'GPOZaurr Report' {
New-HTMLTabStyle -BorderRadius 0px -TextTransform capitalize -BackgroundColorActive SlateGrey
New-HTMLSectionStyle -BorderRadius 0px -HeaderBackGroundColor Grey -RemoveShadow
New-HTMLPanelStyle -BorderRadius 0px
+29
View File
@@ -1,4 +1,33 @@
function Remove-PrivPermission {
<#
.SYNOPSIS
Removes a specified permission from a Group Policy Object (GPO).
.DESCRIPTION
This function removes a specified permission from a GPO based on the provided Principal and PrincipalType. It supports removing permissions by DistinguishedName or SID. It also provides the option to include specific permission types.
.PARAMETER Principal
Specifies the principal for which the permission needs to be removed.
.PARAMETER PrincipalType
Specifies the type of the principal. Valid values are 'DistinguishedName', 'Name', or 'Sid'.
.PARAMETER GPOPermission
Specifies the GPO permission object to remove.
.PARAMETER IncludePermissionType
Specifies the permission type to include in the removal process.
.EXAMPLE
Remove-PrivPermission -Principal "CN=User1,OU=Users,DC=Contoso,DC=com" -PrincipalType "DistinguishedName" -GPOPermission $PermissionObject -IncludePermissionType "Read"
This example removes the "Read" permission for the user with the specified DistinguishedName from the GPO.
.EXAMPLE
Remove-PrivPermission -Principal "S-1-5-21-3623811015-3361044348-30300820-1013" -PrincipalType "Sid" -GPOPermission $PermissionObject -IncludePermissionType "Write"
This example removes the "Write" permission for the user with the specified SID from the GPO.
#>
[cmdletBinding(SupportsShouldProcess)]
param(
[string] $Principal,
+12
View File
@@ -1,4 +1,16 @@
function Reset-GPOZaurrStatus {
<#
.SYNOPSIS
Resets the status of GPO configurations.
.DESCRIPTION
This function resets the status of GPO configurations by enabling the default types and disabling all other types.
.EXAMPLE
Reset-GPOZaurrStatus
Resets the status of GPO configurations to default.
#>
param(
)
+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 = @(
@{
+28
View File
@@ -1,4 +1,32 @@
function Test-SysVolFolders {
<#
.SYNOPSIS
Tests the SYSVOL folders for discrepancies between Group Policy Objects (GPOs) in Active Directory and SYSVOL.
.DESCRIPTION
The Test-SysVolFolders function compares the GPOs in Active Directory with the GPOs stored in the SYSVOL folder to identify any discrepancies. It checks for missing GPOs, GPOs not available in SYSVOL, and orphaned GPOs.
.PARAMETER GPOs
An array of Group Policy Objects to be compared.
.PARAMETER Server
The server name where the SYSVOL folder is located.
.PARAMETER Domain
The domain name where the SYSVOL folder is located.
.PARAMETER PoliciesAD
A dictionary containing the GPOs from Active Directory.
.PARAMETER PoliciesSearchBase
The search base for the GPOs in Active Directory.
.EXAMPLE
Test-SysVolFolders -GPOs $GPOs -Server "DC01" -Domain "contoso.com" -PoliciesAD $PoliciesAD -PoliciesSearchBase "OU=Group Policies,DC=contoso,DC=com"
Description:
This example tests the SYSVOL folders for discrepancies using the specified parameters.
#>
[cmdletBinding()]
param(
[Array] $GPOs,
+39
View File
@@ -1,4 +1,43 @@
function Add-GPOPermission {
<#
.SYNOPSIS
Adds a permission to a Group Policy Object (GPO).
.DESCRIPTION
This function adds a permission to a specified Group Policy Object (GPO) based on the provided parameters.
.PARAMETER Type
Specifies the type of permission to add. Valid values are 'WellKnownAdministrative', 'Administrative', 'AuthenticatedUsers', and 'Default'.
.PARAMETER IncludePermissionType
Specifies the permission type to include.
.PARAMETER Principal
Specifies the principal to which the permission is granted.
.PARAMETER PrincipalType
Specifies the type of the principal. Valid values are 'DistinguishedName', 'Name', and 'Sid'.
.PARAMETER PermitType
Specifies whether to allow or deny the permission. Valid values are 'Allow' and 'Deny'.
.EXAMPLE
Add-GPOPermission -Type Default -IncludePermissionType Read -Principal "Domain Admins" -PrincipalType DistinguishedName -PermitType Allow
Adds a permission to the GPO with default settings allowing 'Domain Admins' to read.
.EXAMPLE
Add-GPOPermission -Type Administrative -IncludePermissionType Write -Principal "Finance Group" -PrincipalType Name -PermitType Allow
Adds a permission to the GPO for the 'Finance Group' allowing write access.
.EXAMPLE
Add-GPOPermission -Type AuthenticatedUsers -IncludePermissionType Modify -PermitType Deny
Adds a permission to the GPO for all authenticated users denying modification.
.EXAMPLE
Add-GPOPermission -Type WellKnownAdministrative -IncludePermissionType FullControl -Principal "Enterprise Admins" -PrincipalType Sid -PermitType Allow
Adds a permission to the GPO for 'Enterprise Admins' with full control.
#>
[cmdletBinding()]
param(
[validateset('WellKnownAdministrative', 'Administrative', 'AuthenticatedUsers', 'Default')][string] $Type = 'Default',
+64
View File
@@ -1,4 +1,68 @@
function Add-GPOZaurrPermission {
<#
.SYNOPSIS
Adds permissions to a Group Policy Object (GPO) in Active Directory.
.DESCRIPTION
This function allows you to add permissions to a specified GPO in Active Directory. You can specify the GPO by name, GUID, or apply permissions to all GPOs. Various parameters allow you to customize the permission settings.
.PARAMETER GPOName
Specifies the name of the GPO to which permissions will be added.
.PARAMETER GPOGuid
Specifies the GUID of the GPO to which permissions will be added.
.PARAMETER All
Indicates that permissions should be added to all GPOs.
.PARAMETER ADObject
Specifies the Active Directory object to which permissions will be applied.
.PARAMETER Type
Specifies the type of permissions to be added. Valid values are 'WellKnownAdministrative', 'Administrative', 'AuthenticatedUsers', and 'Default'.
.PARAMETER Principal
Specifies the trustee to which permissions will be granted.
.PARAMETER PrincipalType
Specifies the type of the trustee. Valid values are 'DistinguishedName', 'Name', and 'Sid'.
.PARAMETER PermissionType
Specifies the type of permission to be added.
.PARAMETER Inheritable
Indicates whether permissions should be inheritable.
.PARAMETER PermitType
Specifies the type of permission to be granted. Valid values are 'Allow', 'Deny', and 'All'.
.PARAMETER Forest
Specifies the forest in which the GPO resides.
.PARAMETER ExcludeDomains
Specifies the domains to exclude when applying permissions.
.PARAMETER IncludeDomains
Specifies the domains to include when applying permissions.
.PARAMETER ExtendedForestInformation
Specifies additional information about the forest.
.PARAMETER ADAdministrativeGroups
Specifies the administrative groups in Active Directory.
.PARAMETER LimitProcessing
Specifies the maximum number of processing steps.
.EXAMPLE
Add-GPOZaurrPermission -GPOName "TestGPO" -Principal "User1" -PermissionType Read -PermitType Allow
Adds read permission to "User1" for the GPO named "TestGPO".
.EXAMPLE
Add-GPOZaurrPermission -GPOGuid "12345678-1234-1234-1234-1234567890AB" -Principal "Group1" -PermissionType Write -PermitType Deny
Denies write permission to "Group1" for the GPO with the specified GUID.
#>
[cmdletBinding(SupportsShouldProcess, DefaultParameterSetName = 'GPOName')]
param(
[Parameter(ParameterSetName = 'GPOName', Mandatory)][string] $GPOName,
+40
View File
@@ -1,4 +1,44 @@
function Clear-GPOZaurrSysvolDFSR {
<#
.SYNOPSIS
Clears the ConflictAndDeleted folder in DFSR for specified GPOs.
.DESCRIPTION
This function clears the ConflictAndDeleted folder in DFSR for specified Group Policy Objects (GPOs) within a given forest. It allows excluding specific domains and domain controllers if needed.
.PARAMETER Forest
Specifies the forest name where the GPOs are located.
.PARAMETER ExcludeDomains
Specifies an array of domains to exclude from the cleanup process.
.PARAMETER ExcludeDomainControllers
Specifies an array of domain controllers to exclude from the cleanup process.
.PARAMETER IncludeDomains
Specifies an array of domains to include in the cleanup process.
.PARAMETER IncludeDomainControllers
Specifies an array of domain controllers to include in the cleanup process.
.PARAMETER SkipRODC
Indicates whether Read-Only Domain Controllers (RODCs) should be skipped during cleanup.
.PARAMETER ExtendedForestInformation
Specifies additional forest information if needed.
.PARAMETER LimitProcessing
Specifies the maximum number of GPOs to process.
.EXAMPLE
Clear-GPOZaurrSysvolDFSR -Forest "contoso.com" -IncludeDomains "child.contoso.com" -ExcludeDomainControllers "dc1.contoso.com" -SkipRODC
Clears the ConflictAndDeleted folder in DFSR for GPOs in the "contoso.com" forest, including only the "child.contoso.com" domain and excluding the "dc1.contoso.com" domain controller.
.EXAMPLE
Clear-GPOZaurrSysvolDFSR -Forest "contoso.com" -IncludeDomains "child.contoso.com" -LimitProcessing 5
Clears the ConflictAndDeleted folder in DFSR for GPOs in the "contoso.com" forest, including only the "child.contoso.com" domain, and processes a maximum of 5 GPOs.
#>
[cmdletBinding(SupportsShouldProcess)]
param(
[alias('ForestName')][string] $Forest,
+22
View File
@@ -1,4 +1,26 @@
function ConvertFrom-CSExtension {
<#
.SYNOPSIS
Converts Client-side Extension (CSE) GUIDs to their corresponding names.
.DESCRIPTION
This function takes an array of CSE GUIDs and returns their corresponding names. It can be used to easily identify the purpose of each CSE GUID.
.PARAMETER CSE
Specifies an array of Client-side Extension (CSE) GUIDs to be converted to names.
.PARAMETER Limited
Indicates whether the conversion should be limited to a predefined set of CSE GUIDs.
.EXAMPLE
ConvertFrom-CSExtension -CSE '{35378EAC-683F-11D2-A89A-00C04FBBCFA2}', '{0F6B957E-509E-11D1-A7CC-0000F87571E3}' -Limited
Converts the specified CSE GUIDs to their corresponding names, limited to a predefined set.
.EXAMPLE
ConvertFrom-CSExtension -CSE '{D02B1F73-3407-48AE-BA88-E8213C6761F1}', '{0ACDD40C-75AC-47ab-BAA0-BF6DE7E7FE63}'
Converts the specified CSE GUIDs to their corresponding names without any limitations.
#>
[cmdletBinding()]
param(
[string[]] $CSE,
+7 -6
View File
@@ -1,22 +1,23 @@
function Export-GPOZaurrContent {
<#
.SYNOPSIS
Saves GPOs to XML or HTML files.
Exports Group Policy Objects (GPOs) to XML or HTML files.
.DESCRIPTION
Saves GPOs to XML or HTML files.
This function exports GPOs to either XML or HTML files based on the specified parameters.
.PARAMETER FolderOutput
The folder where the GPOs will be saved.
Specifies the folder path where the exported GPO files will be saved.
.PARAMETER ReportType
The type of report to generate. Valid values are XML or HTML. Default is XML.
Specifies the type of report to generate. Valid values are XML or HTML. The default value is XML.
.EXAMPLE
An example
Export-GPOZaurrContent -FolderOutput "C:\ExportedGPOs" -ReportType HTML
Exports all GPOs to HTML format and saves them in the "C:\ExportedGPOs" folder.
.NOTES
General notes
This function exports GPOs to XML or HTML files for further analysis or backup purposes.
#>
[CmdletBinding()]
param(
+21
View File
@@ -1,4 +1,25 @@
function Find-CSExtension {
<#
.SYNOPSIS
This function retrieves Group Policy Client Side Extensions (CSEs) from a specified Windows computer.
.DESCRIPTION
The Find-CSExtension function lists Group Policy Client Side Extensions (CSEs) configured on a Windows computer. It queries the Windows Registry to retrieve information about the CSEs.
.PARAMETER CSE
Specifies an array of CSE names to filter the results. If not provided, all CSEs will be listed.
.PARAMETER ComputerName
Specifies the name of the computer from which to retrieve the CSE information.
.EXAMPLE
Find-CSExtension -ComputerName "Computer01"
Retrieves all CSEs configured on the computer named "Computer01".
.EXAMPLE
Find-CSExtension -CSE "CSE1", "CSE2" -ComputerName "Computer02"
Retrieves information about CSEs named "CSE1" and "CSE2" on the computer named "Computer02".
#>
[cmdletBinding()]
param(
[string[]] $CSE,
+56
View File
@@ -1,4 +1,60 @@
function Get-GPOZaurrAD {
<#
.SYNOPSIS
Retrieves Group Policy Objects (GPOs) information from Active Directory.
.DESCRIPTION
This function retrieves information about Group Policy Objects (GPOs) from Active Directory based on specified criteria such as GPO name, GPO GUID, date range, and forest details.
.PARAMETER GPOName
Specifies the name of the GPO to retrieve.
.PARAMETER GPOGuid
Specifies the GUID of the GPO to retrieve.
.PARAMETER Forest
Specifies the forest name to search for GPOs.
.PARAMETER ExcludeDomains
Specifies an array of domains to exclude from the search.
.PARAMETER IncludeDomains
Specifies an array of domains to include in the search.
.PARAMETER DateFrom
Specifies the start date for filtering GPOs based on creation or modification date.
.PARAMETER DateTo
Specifies the end date for filtering GPOs based on creation or modification date.
.PARAMETER DateRange
Specifies a predefined date range for filtering GPOs based on creation or modification date.
.PARAMETER DateProperty
Specifies the property (WhenCreated or WhenChanged) to use for filtering GPOs based on date.
.PARAMETER ExtendedForestInformation
Specifies additional forest information to include in the output.
.EXAMPLE
Get-GPOZaurrAD -GPOName "ExampleGPO"
Description:
Retrieves information about a GPO with the name "ExampleGPO".
.EXAMPLE
Get-GPOZaurrAD -GPOGuid "{12345678-1234-1234-1234-123456789012}"
Description:
Retrieves information about a GPO with the specified GUID.
.EXAMPLE
Get-GPOZaurrAD -Forest "example.com" -IncludeDomains "domain1", "domain2" -DateRange "Last30Days"
Description:
Retrieves GPO information from the forest "example.com" for domains "domain1" and "domain2" created or modified in the last 30 days.
#>
[cmdletbinding(DefaultParameterSetName = 'Default')]
param(
[Parameter(ParameterSetName = 'GPOName')]

Some files were not shown because too many files have changed in this diff Show More