mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-07-26 20:00:09 +00:00
Compare commits
302 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 25c13b54aa | |||
| 2b9faa4e61 | |||
| 42f3053896 | |||
| edcba71e7f | |||
| c8ee2cca56 | |||
| 3b4617af83 | |||
| 6830b1e219 | |||
| 28c55deaa7 | |||
| c757c8281b | |||
| e3e5582696 | |||
| 8e2f4f1552 | |||
| 863c9fabc9 | |||
| 972b51b472 | |||
| 060fb95064 | |||
| fdfc700c6f | |||
| 81eaac3fd1 | |||
| cf9164766e | |||
| 4de2e2a57e | |||
| 663e6058e6 | |||
| f681a5586e | |||
| 4c022bfc16 | |||
| c03f158b77 | |||
| 4824633787 | |||
| 8dc7e5b26d | |||
| 68ed20f3e8 | |||
| df2bacdba7 | |||
| f67ade6341 | |||
| 5855ca2a7c | |||
| b5d69c8a1f | |||
| 32dc6ac661 | |||
| 300d6f63c5 | |||
| 1f43816804 | |||
| 5d50536f5a | |||
| 4da232a1be | |||
| fb5fa00dce | |||
| 970080bfad | |||
| 845c2124bd | |||
| 14d33aa2a6 | |||
| d596fd31fc | |||
| a5cf96398c | |||
| 68921b7fc7 | |||
| ab8443d450 | |||
| 386af088ae | |||
| ad0903e4d9 | |||
| 91ff9da014 | |||
| a262ba531f | |||
| ea7b4f1bd8 | |||
| 09cbd6ca27 | |||
| ddd2139ebd | |||
| ca6e90f399 | |||
| 90931d5c80 | |||
| bfd45c0604 | |||
| 231c2951e0 | |||
| faea9753ae | |||
| 4c49406a6c | |||
| f3d73abed4 | |||
| 620ce6cd61 | |||
| b336f73eda | |||
| bfefb7f943 | |||
| 18226c172a | |||
| 3320b26bd4 | |||
| ec91c69673 | |||
| 31e9b3b4d3 | |||
| d7eedc97b9 | |||
| 42d3ba67dc | |||
| cdc9c1cbc5 | |||
| de28c53842 | |||
| be0be57994 | |||
| 652f553e71 | |||
| 5d2a4725f1 | |||
| 4081a5ead1 | |||
| 796c69de37 | |||
| 9929d827f5 | |||
| 4781b91e23 | |||
| 1ca78cf5f5 | |||
| 768e32cf7e | |||
| 0d43c4e809 | |||
| ac4a9bb43d | |||
| 0abde822f5 | |||
| bf3ec81ea6 | |||
| c0d1f4de1c | |||
| 65719b8c4c | |||
| 096e6983c6 | |||
| ea4ef03e4f | |||
| 61ca7fede4 | |||
| 5cc0db1031 | |||
| d748afda1d | |||
| 9165f23f1b | |||
| 1c700cd27c | |||
| a566d4716a | |||
| 196163cc1f | |||
| a546a023ff | |||
| f5a38b4351 | |||
| 9c668ac869 | |||
| a50dd3cc9a | |||
| 45be7cd432 | |||
| cab639239f | |||
| 5a578278d0 | |||
| 408c4a5530 | |||
| 40905c67ec | |||
| cf8c687e57 | |||
| 580ef74486 | |||
| ebecd56dff | |||
| d5700d873a | |||
| 89c216bb55 | |||
| fe2ff87120 | |||
| 0c756b6f0d | |||
| 3dc5dc7be4 | |||
| d75172e6b1 | |||
| ee12a4f619 | |||
| c96c8285bf | |||
| 8c3ed61142 | |||
| 2934acafeb | |||
| 7203b7f544 | |||
| d22e79b657 | |||
| e07c2dae9a | |||
| 8b1b225ce1 | |||
| 1a54d62b2e | |||
| 352ddc18f3 | |||
| 017007d8c9 | |||
| 4803d3e183 | |||
| 92fcb80005 | |||
| 4985a114dc | |||
| 3ad4a92c66 | |||
| e78db61695 | |||
| 781e95d042 | |||
| 4e1f35f433 | |||
| 74eb14753e | |||
| 1a7bb0273f | |||
| 65eea07b6f | |||
| fe917d70b0 | |||
| 9786186a59 | |||
| b6fc7a676b | |||
| 46e6815314 | |||
| b3e9ddeb64 | |||
| e5f67d8f2e | |||
| 24f81647fa | |||
| cdeb2b4a2d | |||
| f7cf18500d | |||
| 1becfbca60 | |||
| 82c21edcc2 | |||
| e56cf3bde3 | |||
| 996139ab4a | |||
| 5590e3bf31 | |||
| 9db54b338b | |||
| e79d95c0fd | |||
| 8c1f95b1b8 | |||
| 4d9f1e7fba | |||
| 88fb1651a9 | |||
| 9696fb0cab | |||
| bb77785ea8 | |||
| 168919d7d9 | |||
| 5effe5face | |||
| 6d15363caa | |||
| 6c62a11767 | |||
| 61bfe5bd4d | |||
| 5043767e8d | |||
| e4ecafaea5 | |||
| 154e3428e6 | |||
| a6c2ac1226 | |||
| 2b0a395abc | |||
| 04b7242bde | |||
| 48af562bfd | |||
| a5d447b28c | |||
| e649a489bc | |||
| bf3cfb8d21 | |||
| f250453536 | |||
| 34902ab6d8 | |||
| ddaadf56a3 | |||
| 25805e5199 | |||
| e0fe437e1e | |||
| c282fcc784 | |||
| a8f496190d | |||
| 4f41a98e89 | |||
| 010c4dc8e0 | |||
| db57b9ee22 | |||
| b7315b0fa5 | |||
| 8b9c9e66b8 | |||
| 5a2f789321 | |||
| b3023051f3 | |||
| 9538facc13 | |||
| 7c914d8134 | |||
| 90f951d995 | |||
| b2db6d5662 | |||
| cafd3f7938 | |||
| ba81950eed | |||
| 810ef18baa | |||
| dbf99debee | |||
| 4cd644d1b4 | |||
| e2aa7af83d | |||
| ff1668c60d | |||
| 5f82bbaea4 | |||
| 75cee65b65 | |||
| 0dc56d314e | |||
| 9c689708ba | |||
| bb18d488b4 | |||
| e72d81aee3 | |||
| 70ed52cdf9 | |||
| 3b414e712c | |||
| 7ed1410fd9 | |||
| 6d2e476916 | |||
| b7ed5e0c5a | |||
| 72bd69d0e6 | |||
| b5c1f3dcd5 | |||
| bc773e2e83 | |||
| 8db961cba6 | |||
| 227639d0f6 | |||
| e03f819461 | |||
| fb955f645b | |||
| 3fc3b74798 | |||
| 695f4dbe6a | |||
| 5d69cef128 | |||
| 062374b4be | |||
| e61329ac66 | |||
| d3328dbb81 | |||
| 5803371b5e | |||
| 263f364ede | |||
| 16a181155b | |||
| 962d8829d7 | |||
| 4155c35cc6 | |||
| 614d8cbda5 | |||
| 43e7f2e746 | |||
| 9a3ed3b6ce | |||
| 50f0cfc1a6 | |||
| 269d611563 | |||
| 55ab89a5b0 | |||
| 9da8c7c94b | |||
| 53aa69029f | |||
| 4189ad12f2 | |||
| b1c3037803 | |||
| 62308cbb6d | |||
| 914dcfb0c4 | |||
| 2cf4d2c6c9 | |||
| d53d50f99b | |||
| 2ef3c306ff | |||
| 481338f83b | |||
| eaf3b231ae | |||
| b2c73479c7 | |||
| 38c6327e30 | |||
| 0b3e072a3e | |||
| 89664bfd02 | |||
| 1021ebe5f4 | |||
| 521125bbc1 | |||
| ae6b596e5b | |||
| bfe50f02fe | |||
| 187b44a19d | |||
| 36793b33c4 | |||
| 94e6c785c1 | |||
| efbd2b12de | |||
| d0a678353f | |||
| 6b0f3b332d | |||
| 37483c91b5 | |||
| 9172948be3 | |||
| 14567959f7 | |||
| 6a9ad14083 | |||
| e00de40cd2 | |||
| 6f806698e9 | |||
| 2e1571b0d7 | |||
| ffedd2d9d2 | |||
| 911bc50f22 | |||
| 0383d249e9 | |||
| 8070179d27 | |||
| db67e6191e | |||
| db9b6d60c6 | |||
| 2c965d81d5 | |||
| bff372affe | |||
| 138a0f411e | |||
| 1c37a9d1df | |||
| 30535c1baf | |||
| 56c722edd0 | |||
| 1f43ae21fe | |||
| ef90ef05f7 | |||
| 43b304d252 | |||
| 24e691edb9 | |||
| 1c787735d4 | |||
| 13a2aa6482 | |||
| 1ac1f83abd | |||
| 65b2867588 | |||
| 1043a2d512 | |||
| 7002813027 | |||
| 03b8e4f2cb | |||
| 680762733e | |||
| 7a37d5b9f6 | |||
| a1e9a4a3fa | |||
| 8cbb3272b2 | |||
| 8da0c1793d | |||
| 5a7b20ca2b | |||
| ebffba3b95 | |||
| a79071c395 | |||
| a5a889b468 | |||
| 62d73041ea | |||
| d88307047c | |||
| 7d85d41747 | |||
| a1fab2ceb2 | |||
| 99f07f61e3 | |||
| 58136f0c43 | |||
| b55729d8e0 | |||
| 6206a33a2e | |||
| 165381b1e3 | |||
| ea1de10fd9 | |||
| 03453b6bdb | |||
| 4d7f49902d |
@@ -0,0 +1,8 @@
|
||||
Ignore/*
|
||||
.vs/*
|
||||
.vscode/*
|
||||
Releases/*
|
||||
ReleasesUnpacked/*
|
||||
*.log
|
||||
*.html
|
||||
Artefacts/*
|
||||
@@ -0,0 +1,226 @@
|
||||
Clear-Host
|
||||
|
||||
Import-Module "PSPublishModule" -Force
|
||||
|
||||
Invoke-ModuleBuild -ModuleName 'GPOZaurr' {
|
||||
# Usual defaults as per standard module
|
||||
$Manifest = @{
|
||||
# Version number of this module.
|
||||
ModuleVersion = '1.X.0'
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = @('Desktop')
|
||||
# ID used to uniquely identify this module
|
||||
GUID = 'f7d4c9e4-0298-4f51-ad77-e8e3febebbde'
|
||||
# Author of this module
|
||||
Author = 'Przemyslaw Klys'
|
||||
# Company or vendor of this module
|
||||
CompanyName = 'Evotec'
|
||||
# Copyright statement for this module
|
||||
Copyright = "(c) 2011 - $((Get-Date).Year) Przemyslaw Klys @ Evotec. All rights reserved."
|
||||
# Description of the functionality provided by this module
|
||||
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.'
|
||||
# Minimum version of the Windows PowerShell engine required by this module
|
||||
PowerShellVersion = '5.1'
|
||||
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
|
||||
Tags = @('Windows', 'ActiveDirectory', 'GPO', 'GroupPolicy')
|
||||
#IconUri = 'https://evotec.xyz/wp-content/uploads/2019/02/PSPublishModule.png'
|
||||
|
||||
ProjectUri = 'https://github.com/EvotecIT/GPOZaurr'
|
||||
}
|
||||
New-ConfigurationManifest @Manifest
|
||||
|
||||
New-ConfigurationModule -Type RequiredModule -Name 'PSWriteColor', 'PSSharedGoods', 'ADEssentials', 'PSWriteHTML' -Guid Auto -Version Latest
|
||||
#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'
|
||||
|
||||
New-ConfigurationModule -Type ExternalModule -Name @(
|
||||
"CimCmdlets"
|
||||
'Microsoft.PowerShell.Management'
|
||||
'Microsoft.PowerShell.Utility'
|
||||
'Microsoft.PowerShell.Security'
|
||||
)
|
||||
|
||||
New-ConfigurationModuleSkip -IgnoreModuleName @(
|
||||
# this are builtin into PowerShell, so not critical
|
||||
'powershellget'
|
||||
'GroupPolicy'
|
||||
'ScheduledTasks'
|
||||
'ActiveDirectory'
|
||||
'Microsoft.WSMan.Management'
|
||||
'NetConnection'
|
||||
'NetSecurity'
|
||||
'NetTCPIP'
|
||||
) -IgnoreFunctionName @(
|
||||
'Select-Unique'
|
||||
)
|
||||
|
||||
New-ConfigurationCommand -ModuleName 'ActiveDirectory' -CommandName @(
|
||||
'Add-GPOPermission'
|
||||
'Add-GPOZaurrPermission'
|
||||
'Backup-GPOZaurr'
|
||||
'Clear-GPOZaurrSysvolDFSR'
|
||||
'ConvertFrom-CSExtension'
|
||||
'Find-CSExtension'
|
||||
'Get-GPOZaurr'
|
||||
'Get-GPOZaurrAD'
|
||||
'Get-GPOZaurrBackupInformation'
|
||||
'Get-GPOZaurrBroken'
|
||||
'Get-GPOZaurrDictionary'
|
||||
'Get-GPOZaurrDuplicateObject'
|
||||
'Get-GPOZaurrFiles'
|
||||
'Get-GPOZaurrFilesPolicyDefinition'
|
||||
'Get-GPOZaurrFolders'
|
||||
'Get-GPOZaurrInheritance'
|
||||
'Get-GPOZaurrLegacyFiles'
|
||||
'Get-GPOZaurrLink'
|
||||
'Get-GPOZaurrLinkSummary'
|
||||
'Get-GPOZaurrNetLogon'
|
||||
'Get-GPOZaurrOwner'
|
||||
'Get-GPOZaurrPassword'
|
||||
'Get-GPOZaurrPermission'
|
||||
'Get-GPOZaurrPermissionConsistency'
|
||||
'Get-GPOZaurrPermissionRoot'
|
||||
'Get-GPOZaurrPermissionSummary'
|
||||
'Get-GPOZaurrSysvolDFSR'
|
||||
'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-GPOZaurrPermission'
|
||||
'Remove-GPOZaurrWMI'
|
||||
'Repair-GPOZaurrNetLogonOwner'
|
||||
'Repair-GPOZaurrPermissionConsistency'
|
||||
'Restore-GPOZaurr'
|
||||
'Save-GPOZaurrFiles'
|
||||
'Set-GPOOwner'
|
||||
'Set-GPOZaurrOwner'
|
||||
'Find-GPO'
|
||||
'Get-GPOZaurrFilesPolicyDefinitions'
|
||||
'Get-GPOZaurrSysvol'
|
||||
'Remove-GPOZaurrOrphaned'
|
||||
'Show-GPO'
|
||||
'Show-GPOZaurr'
|
||||
)
|
||||
New-ConfigurationCommand -ModuleName 'GroupPolicy' -CommandName @(
|
||||
'Add-GPOPermission'
|
||||
'Add-GPOZaurrPermission'
|
||||
'Backup-GPOZaurr'
|
||||
'Clear-GPOZaurrSysvolDFSR'
|
||||
'ConvertFrom-CSExtension'
|
||||
'Find-CSExtension'
|
||||
'Get-GPOZaurr'
|
||||
'Get-GPOZaurrAD'
|
||||
'Get-GPOZaurrBackupInformation'
|
||||
'Get-GPOZaurrBroken'
|
||||
'Get-GPOZaurrDictionary'
|
||||
'Get-GPOZaurrDuplicateObject'
|
||||
'Get-GPOZaurrFiles'
|
||||
'Get-GPOZaurrFilesPolicyDefinition'
|
||||
'Get-GPOZaurrFolders'
|
||||
'Get-GPOZaurrInheritance'
|
||||
'Get-GPOZaurrLegacyFiles'
|
||||
'Get-GPOZaurrLink'
|
||||
'Get-GPOZaurrLinkSummary'
|
||||
'Get-GPOZaurrNetLogon'
|
||||
'Get-GPOZaurrOwner'
|
||||
'Get-GPOZaurrPassword'
|
||||
'Get-GPOZaurrPermission'
|
||||
'Get-GPOZaurrPermissionConsistency'
|
||||
'Get-GPOZaurrPermissionRoot'
|
||||
'Get-GPOZaurrPermissionSummary'
|
||||
'Get-GPOZaurrSysvolDFSR'
|
||||
'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-GPOZaurrPermission'
|
||||
'Remove-GPOZaurrWMI'
|
||||
'Repair-GPOZaurrNetLogonOwner'
|
||||
'Repair-GPOZaurrPermissionConsistency'
|
||||
'Restore-GPOZaurr'
|
||||
'Save-GPOZaurrFiles'
|
||||
'Set-GPOOwner'
|
||||
'Set-GPOZaurrOwner'
|
||||
'Find-GPO'
|
||||
'Get-GPOZaurrFilesPolicyDefinitions'
|
||||
'Get-GPOZaurrSysvol'
|
||||
'Remove-GPOZaurrOrphaned'
|
||||
'Show-GPO'
|
||||
'Show-GPOZaurr'
|
||||
)
|
||||
|
||||
|
||||
$ConfigurationFormat = [ordered] @{
|
||||
RemoveComments = $true
|
||||
RemoveEmptyLines = $true
|
||||
|
||||
PlaceOpenBraceEnable = $true
|
||||
PlaceOpenBraceOnSameLine = $true
|
||||
PlaceOpenBraceNewLineAfter = $true
|
||||
PlaceOpenBraceIgnoreOneLineBlock = $false
|
||||
|
||||
PlaceCloseBraceEnable = $true
|
||||
PlaceCloseBraceNewLineAfter = $true
|
||||
PlaceCloseBraceIgnoreOneLineBlock = $false
|
||||
PlaceCloseBraceNoEmptyLineBefore = $true
|
||||
|
||||
UseConsistentIndentationEnable = $true
|
||||
UseConsistentIndentationKind = 'space'
|
||||
UseConsistentIndentationPipelineIndentation = 'IncreaseIndentationAfterEveryPipeline'
|
||||
UseConsistentIndentationIndentationSize = 4
|
||||
|
||||
UseConsistentWhitespaceEnable = $true
|
||||
UseConsistentWhitespaceCheckInnerBrace = $true
|
||||
UseConsistentWhitespaceCheckOpenBrace = $true
|
||||
UseConsistentWhitespaceCheckOpenParen = $true
|
||||
UseConsistentWhitespaceCheckOperator = $true
|
||||
UseConsistentWhitespaceCheckPipe = $true
|
||||
UseConsistentWhitespaceCheckSeparator = $true
|
||||
|
||||
AlignAssignmentStatementEnable = $true
|
||||
AlignAssignmentStatementCheckHashtable = $true
|
||||
|
||||
UseCorrectCasingEnable = $true
|
||||
}
|
||||
# format PSD1 and PSM1 files when merging into a single file
|
||||
# enable formatting is not required as Configuration is provided
|
||||
New-ConfigurationFormat -ApplyTo 'OnMergePSM1', 'OnMergePSD1' -Sort None @ConfigurationFormat
|
||||
# format PSD1 and PSM1 files within the module
|
||||
# enable formatting is required to make sure that formatting is applied (with default settings)
|
||||
New-ConfigurationFormat -ApplyTo 'DefaultPSD1', 'DefaultPSM1' -EnableFormatting -Sort None
|
||||
# when creating PSD1 use special style without comments and with only required parameters
|
||||
New-ConfigurationFormat -ApplyTo 'DefaultPSD1', 'OnMergePSD1' -PSD1Style 'Minimal'
|
||||
# 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-ConfigurationBuild -Enable:$true -SignModule -MergeModuleOnBuild -MergeFunctionsFromApprovedModules -CertificateThumbprint '483292C9E317AA13B07BB7A96AE9D1A5ED9E7703'
|
||||
|
||||
# New-ConfigurationTest -TestsPath "$PSScriptRoot\..\Tests" -Enable
|
||||
|
||||
New-ConfigurationArtefact -Type Unpacked -Enable -Path "$PSScriptRoot\..\Artefacts\Unpacked" -AddRequiredModules
|
||||
New-ConfigurationArtefact -Type Packed -Enable -Path "$PSScriptRoot\..\Artefacts\Packed" -ArtefactName '<ModuleName>.v<ModuleVersion>.zip' -AddRequiredModules
|
||||
|
||||
# options for publishing to github/psgallery
|
||||
#New-ConfigurationPublish -Type PowerShellGallery -FilePath 'C:\Support\Important\PowerShellGalleryAPI.txt' -Enabled:$true
|
||||
#New-ConfigurationPublish -Type GitHub -FilePath 'C:\Support\Important\GitHubAPI.txt' -UserName 'EvotecIT' -Enabled:$true
|
||||
} -ExitCode
|
||||
+547
@@ -0,0 +1,547 @@
|
||||
# GPOZaurr Release History
|
||||
|
||||
## 1.1.0 - 2024.04.02
|
||||
- Improve `Invoke-GPOZaurr` - by adding `GPOName` and `GPOGUID` parameters, providing ability to analyse single/multiple GPOs
|
||||
- Those parameters are only applicable to `GPOAnalysis`,`GPOBrokenPartially` for now (need to be expanded further)
|
||||
- Improve `Invoke-GPOZaurrContent` by allowing `GPOName` and `GPOGUID` parameters, providing ability to analyse single/multiple GPOs
|
||||
- Small verbose message improvement for `Export-GPOZaurrContent`
|
||||
- Added `Get-GPOZaurrMissingFiles` to detect missing files for GPOs
|
||||
- Added `Invoke-GPOZaurr` - type `GPOBrokenPartially` to detect missing files for GPOs
|
||||
- Improve detection of empty GPOs by including check for GPF files
|
||||
- Added `FilesCount` to `Get-GPOZaurr` to detect number of files in GPO
|
||||
|
||||
## 1.0.0 - 2023.09.17
|
||||
- `Get-GPOZaurrUpdates` fix small typo
|
||||
- `Get-GPOZaurrAD` improve performance a bit
|
||||
- `Get-GPOZaurrAD` changed pipeline into standard foreach to improve performance and potential problems for large domains
|
||||
- Added `Get-GPOZaurrRedirect` to detect if GPO path was redirected (security issue)
|
||||
- Added `GPORedirect` report type to `Invoke-GPOZaurr` to detect if GPO path was redirected (security issue)
|
||||
|
||||
## 0.0.160 - 2023.05.26
|
||||
- Fixes `Remove-GPOZaurr` limit processing feature which would not stop in some cases
|
||||
|
||||
## 0.0.159
|
||||
- Fixes [#44 Extra spaces in property name 'Id' in Get-GPOZaurrPermissionConsistency?](https://github.com/EvotecIT/GPOZaurr/issues/44)
|
||||
- Fixes typos [#43](https://github.com/EvotecIT/GPOZaurr/pull/43)
|
||||
|
||||
## 0.0.158 - 2023.03.07
|
||||
- Improve detection of empty OUs by including AD printers.
|
||||
|
||||
## 0.0.157 - 2022.12.16
|
||||
- Resolves *Group Policy Content - GPO Subfolders for Google Chrome* [#38](https://github.com/EvotecIT/GPOZaurr/issues/38)
|
||||
- Resolves *Filename processing issue* [#37](https://github.com/EvotecIT/GPOZaurr/issues/37)
|
||||
|
||||
## 0.0.156 - 2022.12.04
|
||||
- Fixes `Get-LocalComputerSid - Error: You cannot call a method on a null-valued expression` in some rare cases [#34](https://github.com/EvotecIT/GPOZaurr/issues/34)
|
||||
|
||||
## 0.0.155 - 2022.10.27
|
||||
- Fixes `Invoke-GPOZaurr` SplitReports functionality (again! and again!) [#35](https://github.com/EvotecIT/GPOZaurr/issues/35)
|
||||
|
||||
## 0.0.154 - 2022.10.20
|
||||
- Fixes `Invoke-GPOZaurr` SplitReports functionality (again!) [#33](https://github.com/EvotecIT/GPOZaurr/issues/33)
|
||||
- Fixes Sysvol property in object returned by Get-GPOZaurrPermissionConsistency contains whitespace [#31](https://github.com/EvotecIT/GPOZaurr/issues/31)
|
||||
|
||||
## 0.0.153 - 2022.09.12
|
||||
- Fixes `Invoke-GPOZaurr` SplitReports functionality that would generate main report anyways.
|
||||
|
||||
## 0.0.152 - 2022.09.11
|
||||
- ℹ️ Improved `Invoke-GPOZaurr` - disable deprecated reports if user doesn't ask for them but asks for all reports to be generated. Those reports are now disabled by default: GPOPermissionsAdministrative,GPOPermissionsRead,GPOPermissionsRoot,GPOPermissionsUnknown
|
||||
- ℹ️ Improved `Invoke-GPOZaurr` SplitReports functionality to start creating HTML reports every report
|
||||
- Add `Export-GPOZaurrContent` to simplify quick export of all XML/HTML reports from GPO
|
||||
|
||||
## 0.0.151 - 2022.07.26
|
||||
- ℹ️ Improved `Invoke-GPOZaurr` by adding `SplitReports` functionality. This will allow you to split the reports into multiple files with a single request.
|
||||
- ℹ️ Improved `Get-GPOZaurrInheritance` with some error handling
|
||||
|
||||
## 0.0.150 - 2021.12.06
|
||||
- ℹ️ Improves `GPOUpdates` report from `Invoke-GPOZaurr` - additional property
|
||||
## 0.0.149 - 2021.12.05
|
||||
- ℹ️ Improved docs
|
||||
## 0.0.148 - 2021.12.05
|
||||
- ☑ Improved `Invoke-GPOZaurr` - type `GPOOrganizationalUnit` - excludes default redirected computers/users OUs [#30](https://github.com/EvotecIT/GPOZaurr/issues/30)
|
||||
- ☑ Improved `Get-GPOZaurrOrganizationalUnit` - excludes default redirected computers/users OUs as per [#30](https://github.com/EvotecIT/GPOZaurr/issues/30)
|
||||
## 0.0.147 - 2021.12.03
|
||||
- 📃 Updates documentation
|
||||
## 0.0.146 - 2021.11.02
|
||||
- ℹ️ Improves `GPOUpdates` report from `Invoke-GPOZaurr` - should be 7 days, not 14 days
|
||||
## 0.0.145 - 2021.11.02
|
||||
- ℹ️ Improves `GPOUpdates` report from `Invoke-GPOZaurr` by fixing conditional formatting
|
||||
## 0.0.144 - 2021.10.24
|
||||
- ℹ️ Improves `Get-GPOZaurrUpdates`
|
||||
- Adds `GPOUpdates` report to `Invoke-GPOZaurr`
|
||||
## 0.0.143 - 2021.10.19
|
||||
- ℹ️ Improves `Get-GPOZaurrUpdates` with more verbose messages
|
||||
## 0.0.142 - 2021.10.18
|
||||
- 🐛 Fixes `Get-GPOZaurrUpdates` when GPO is not linked
|
||||
## 0.0.141 - 2021.10.17
|
||||
- 🛑 Removed property from `Get-GPOZaurrAD` - `FunctionalityVersion`
|
||||
- ➕ Added property to `Get-GPOZaurrAD` - `Owner`
|
||||
- ➕ Added ability to choose date ranges for `Get-GPOZaurrAD`
|
||||
- ➕ Added `Get-GPOZaurrUpdates` which shows last gpos added to forest
|
||||
## 0.0.140 - 2021.08.24
|
||||
- ☑ Improved `Invoke-GPOZaurr` - type `GPOAnalysis` - added folder redirection type - [tnx PatrickOnGit](https://github.com/EvotecIT/GPOZaurr/pull/24)
|
||||
## 0.0.139 - 2021.08.19
|
||||
- ☑ Improved `Invoke-GPOZaurr` - type `GPOOrganizationalUnit` - adding RootLevel information
|
||||
## 0.0.138 - 2021.08.18
|
||||
- 🐛 Fix for exclusions using GUID with brackets for Invoke-GPOZaurr `GPOList` and related options
|
||||
## 0.0.137 - 2021.08.17
|
||||
- ☑ Improved `Invoke-GPOZaurr` - type `GPOOrganizationalUnit` - moving delete of OU as non-mandatory option
|
||||
## 0.0.136 - 2021.08.17
|
||||
- ☑ Improved wording
|
||||
## 0.0.135 - 2021.08.17
|
||||
- ☑ Improved exclusions
|
||||
## 0.0.134 - 2021.08.16
|
||||
- ☑ Improved exclusions for email use
|
||||
## 0.0.133 - 2021.08.16
|
||||
- ☑ Improved exclusions for email use
|
||||
## 0.0.132 - 2021.08.16
|
||||
- ☑ Improved exclusions for email use
|
||||
## 0.0.131 - 2021.08.16
|
||||
- ☑ Improved exclusions for email use
|
||||
## 0.0.130 - 2021.08.13
|
||||
- 💡 Updated HTML to new version of `PSWriteHTML` that fixes complains about `SearchBuilder` option
|
||||
- ☑ Improved `Invoke-GPOZaurr` - type `GPOOrganizationalUnit` with exclusions
|
||||
|
||||
```powershell
|
||||
Invoke-GPOZaurr -Type GPOOrganizationalUnit -Online -FilePath $PSScriptRoot\Reports\GPOZaurrOU.html -Exclusions @(
|
||||
'*OU=Production,DC=ad,DC=evotec,DC=pl'
|
||||
'*OU=Production,DC=ad,DC=evotec,DC=pl'
|
||||
'*DC=ad,DC=evotec,DC=pl'
|
||||
)
|
||||
```
|
||||
|
||||
- ☑ Improved `Get-GPOZaurrOrganizationalUnit` with exclusions
|
||||
|
||||
```powershell
|
||||
Get-GPOZaurrOrganizationalUnit -Verbose -ExcludeOrganizationalUnit @(
|
||||
'*,OU=Production,DC=ad,DC=evotec,DC=pl'
|
||||
) | Format-Table
|
||||
```
|
||||
|
||||
- ☑ Improved `Remove-GPOZaurrLinkEmptyOU` with exclusions
|
||||
|
||||
```powershell
|
||||
$Exclude = @(
|
||||
"OU=Groups,OU=Production,DC=ad,DC=evotec,DC=pl"
|
||||
"OU=Test \, OU,OU=ITR02,DC=ad,DC=evotec,DC=xyz"
|
||||
)
|
||||
|
||||
Remove-GPOZaurrLinkEmptyOU -Verbose -LimitProcessing 3 -WhatIf -ExcludeOrganizationalUnit $Exclude
|
||||
```
|
||||
|
||||
- ☑ Improved `Invoke-GPOZaurr` - type `GPOOwners` with exclusions
|
||||
|
||||
```powershell
|
||||
Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurrGPOOwners.html -Type GPOOwners -Online -Exclusions @(
|
||||
'EVOTEC\przemyslaw.klys'
|
||||
)
|
||||
```
|
||||
|
||||
- ☑ Improved `Set-GPOZaurrOwner` with exclusions/approved owners
|
||||
|
||||
```powershell
|
||||
Set-GPOZaurrOwner -Type All -Verbose -LimitProcessing 2 -WhatIf -IncludeDomains 'ad.evotec.xyz' -ApprovedOwner @(
|
||||
'EVOTEC\przemyslaw.klys'
|
||||
)
|
||||
```
|
||||
|
||||
- ☑ Improved `Get-GPOZaurrOwner` with exclusions/approved owners
|
||||
|
||||
```powershell
|
||||
$T = Get-GPOZaurrOwner -Verbose -IncludeSysvol -ApprovedOwner @('EVOTEC\przemyslaw.klys')
|
||||
$T | Format-Table *
|
||||
```
|
||||
|
||||
- ☑ Improved `Get-GPOZaurr` with exclusions and support for GUID, strings
|
||||
|
||||
```powershell
|
||||
$GPOS = Get-GPOZaurr -ExcludeGroupPolicies {
|
||||
Skip-GroupPolicy -Name 'de14_usr_std'
|
||||
Skip-GroupPolicy -Name 'de14_usr_std' -DomaiName 'ad.evotec.xyz'
|
||||
Skip-GroupPolicy -Name 'All | Trusted Websites' #-DomaiName 'ad.evotec.xyz'
|
||||
'{D39BF08A-87BF-4662-BFA0-E56240EBD5A2}'
|
||||
'COMPUTERS | Enable Sets'
|
||||
}
|
||||
$GPOS | Format-Table -AutoSize *
|
||||
```
|
||||
|
||||
- ☑ Improved `Invoke-GPOZaurr` with exclusions and support for GUID, strings
|
||||
|
||||
```powershell
|
||||
Invoke-GPOZaurr -Type GPOList -Exclusions {
|
||||
Skip-GroupPolicy -Name 'All | Trusted Websites' -DomaiName 'ad.evotec.xyz'
|
||||
'{D39BF08A-87BF-4662-BFA0-E56240EBD5A2}'
|
||||
'COMPUTERS | Enable Sets'
|
||||
}
|
||||
```
|
||||
|
||||
## 0.0.129 - 2021.08.06
|
||||
- Added `Get-GPOZaurrOrganizationalUnit` and added `GPOOrganizationalUnit` in `Invoke-GPOZaurr` (preview)
|
||||
- Added `Remove-GPOZaurrLinkEmptyOU` which allows removing links from Empty OUs (preview)
|
||||
- Small update to parameter sets for `Set-GPOZaurrOwner`
|
||||
## 0.0.128 - 2021.05.26
|
||||
- ☑ Improved `Invoke-GPOZaurrContent` - type `PublicKeyPoliciesCertificates` - added more certificate information
|
||||
- ☑ Improved `Invoke-GPOZaurr` - type `GPOAnalysis` - added more certificate information
|
||||
## 0.0.128 Alpha 1 - 2021.05.17
|
||||
- 🐛 Fixes errors when normalizing properties [#17](https://github.com/EvotecIT/GPOZaurr/issues/17)
|
||||
## 0.0.127 - 2021.04.15
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Report `GPOList` - moved description closer to statuses
|
||||
- ☑ Improved `Get-GPOZaurr` - moved description closer to statuses
|
||||
## 0.0.126 - 2021.04.12
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Report `GPOBlockedInheritance` - hidden DistinguishedName, fixed some small typos
|
||||
## 0.0.125 - 2021.04.11
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Report `GPOBlockedInheritance` - small fixes
|
||||
## 0.0.124 - 2021.04.11
|
||||
- ☑ Added `SearchBuilder` to all tables
|
||||
- ☑ Automatically joins arrays in tables in `Invoke-GPOZaurr`
|
||||
- ☑ Improved `Get-GPOZaurrInheritance` with Exclusions and some help information
|
||||
- ☑ Improved `Invoke-GPOZaurr` with some Exclusions
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- 🔥 Report `GPOBlockedInheritance` - heavily improved functionality and data
|
||||
## 0.0.123 - 2021.03.21
|
||||
- ☑ Fixes `Get-GPOZaurrLinkSummary`
|
||||
## 0.0.122 - 2021.02.11
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Report `GPOAnalysis` - added `WindowsFirewallRules`,`WindowsFirewallProfiles`,`WindowsFirewallConnectionSecurityAuthentication`,`WindowsFirewallConnectionSecurityRules`
|
||||
- ☑ Improved `Invoke-GPOZaurrContent` as mentioned above for `GPOAnalysis`
|
||||
## 0.0.121 - 2021.02.10
|
||||
- ☑ Improvement to `Get-GPOZaurr` - added description [#13](https://github.com/EvotecIT/GPOZaurr/issues/13)
|
||||
- ☑ Improvement to `Invoke-GPOZaurr -Type GPOList` - added description [#13](https://github.com/EvotecIT/GPOZaurr/issues/13)
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Report GPOAnalysis - added `FolderRedirection`
|
||||
- ☑ Report GPOAnalysis - renamed `FolderRedirection` to `FolderRedirectionPolicy`
|
||||
- ☑ Improved `Invoke-GPOZaurrContent` as mentioned above for `GPOAnalysis`
|
||||
## 0.0.120 - 2021.02.10
|
||||
- ☑ Improvement to `Get-GPOZaurr` to warn if there is potential issue with EMPTY (which can happen on non-english system)
|
||||
- ☑ In such case GPOZaurr will asses EMPTY or not using old method which doesn't detect all EMPTY cases but shouldn't provide false positives
|
||||
## 0.0.119
|
||||
- Broken release - weird
|
||||
## 0.0.118 - 2021.02.09
|
||||
- ☑ Added information where the report is saved
|
||||
- ☑ Small improvement to `Get-GPOZaurr` to exlicitly define variable types
|
||||
## 0.0.117 - 2021.02.09
|
||||
- ☑ Small fix to `Get-GPOZaurr` to exclude GPOList.xml which is used in offline mode by `Save-GPOZaurrFiles`
|
||||
## 0.0.116 - 2021.02.08
|
||||
- ☑ Improved `Remove-GPOZaurrBroken` to handle ObjectClass problem, and removed reduntant check
|
||||
## 0.0.115 - 2021.02.07
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ `GPOList` - clarified some texts, changed 7 days to 30 days as default
|
||||
- ☑ `NetLogonPermissions` - fixed missing text
|
||||
- ☑ Fixes `Get-GPOZaurrNetLogon` error on empty Owner - [#9](https://github.com/EvotecIT/GPOZaurr/issues/9)
|
||||
## 0.0.114 - 2021.01.27
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ HTML now uses offline mode by default (no CDN) - increase in size of HTML up to 3MB
|
||||
- ☑ Using Online switch forces use of CDN - smaller files. For example `Invoke-GPOZaurr -Type GPOList -Online`
|
||||
- [ ] Improved `Invoke-GPOZaurrSupport`
|
||||
- ☑ HTML now uses offline mode by default (no CDN) - increase in size of HTML up to 3MB
|
||||
- ☑ Using Online switch forces use of CDN - smaller files. For example `Invoke-GPOZaurrSupport -Online`
|
||||
- ☑ Removed parameter Offline, added parameter Online
|
||||
- ☑ The cmdlet is not really production ready. It's work in progress
|
||||
## 0.0.113 - 2021.01.25
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Report GPOAnalysis - added WindowsTimeService
|
||||
- ☑ Improved `Invoke-GPOZaurrContent`
|
||||
- ☑ Added `WindowsTimeService` type
|
||||
## 0.0.112 - 2021.01.25
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
## 0.0.111 - 2021.01.24
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
## 0.0.110 - 2021.01.22
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
## 0.0.109 - 2021.01.11
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
## 0.0.108 - 2021.01.11
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Improved `GPOConsistency`
|
||||
## 0.0.107 - 2021.01.11
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
## 0.0.106 - 2021.01.11
|
||||
- ☑ Improved `Invoke-GPOZaurrContent`
|
||||
## 0.0.105 - 2021.01.05
|
||||
- ☑ Improved `Get-GPOZaurr`
|
||||
- ☑ Improved report `GPOBrokenLink`
|
||||
## 0.0.104 - 2021.01.04
|
||||
- ☑ Improved `Get-GPOZaurrBrokenLink`
|
||||
- ☑ Improved `Repair-GPOZaurrBrokenLink`
|
||||
- ☑ Improved `Get-GPOZaurr`
|
||||
- ☑ Improved report `GPOBrokenLink`
|
||||
## 0.0.103 - 2021.01.04
|
||||
- ☑ Improved `Get-GPOZaurr`
|
||||
- ☑ Added new report `GPOBrokenLink`
|
||||
- ☑ Added `Get-GPOZaurrBrokenLink`
|
||||
- ☑ Added `Repair-GPOZaurrBrokenLink`
|
||||
## 0.0.102 - 2021.01.02
|
||||
- ☑ Improved `Get-GPOZaurrLink`
|
||||
- ☑ Supports all links across forest
|
||||
- ☑ Renamed Linked validate set from `Other` to `OrganizationalUnit`
|
||||
- ☑ Improved `Get-GPOZaurrLinkSummary`
|
||||
- ☑ Improved/BugFix `Get-GPOZaurr` to properly detect linked GPOs in sites/cross-domain
|
||||
- ☑ Improved `Invoke-GPOZaurrPermission`
|
||||
- ☑ Renamed Linked validate set from `Other` to `OrganizationalUnit`
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Added `GPOLinks` basic list
|
||||
## 0.0.101 - 23.12.2020
|
||||
- ☑ Improved `Get-GPOZaurrBroken`
|
||||
- ☑ It now detects `ObjectClass Issue`
|
||||
- ☑ Heavily improved performance
|
||||
- ☑ Removed some useless properties for this particular cmdlet
|
||||
- ☑ All states: `Not available on SYSVOL`, `Not available in AD`, `Exists`, `Permissions Issue`, `ObjectClass Issue`
|
||||
- ☑ Improved help
|
||||
- ☑ Improved `Remove-GPOZaurrBroken`
|
||||
- ☑ It now deals with `ObjectClass Issue`
|
||||
- ☑ Heavily improved performance
|
||||
- ☑ Removed some useless properties for this particular cmdlet
|
||||
- ☑ Now requires manual type insert AD, SYSVOL or ObjectClass (or all of them). Before it was auto using AD/SYSVOL.
|
||||
- ☑ Improved help
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Type `GPOList`
|
||||
- ☑ Renamed `GPOOrphans` to `GPOBroken`
|
||||
- ☑ Improved `GPOBroken` with `ObjectClass issue`
|
||||
## 0.0.100 - 21.12.2020
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Type `GPOPermissionsRead`
|
||||
- ☑ Type `GPOPermissions`
|
||||
## 0.0.99 - 13.12.2020
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Type `GPOList` - require GPO to be 7 days old for deletion to be proposed
|
||||
- ☑ Type `GPOPermissions` - one stop for permissions
|
||||
- ☑ Allows Steps to be chosen via their menu and out-of-order
|
||||
- ☑ Improved `Remove-GPOZaurr` - added `RequireDays` parameter to prevent deletion of just modified GPOs
|
||||
- ☑ Added `Get-GPOZaurrPermissionAnalysis`
|
||||
- ☑ Added `Repair-GPOZaurrPermission`
|
||||
## 0.0.98 - 10.12.2020
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Type `GPOList` - fixed unexpected ending of cmdlet when error occurs (for example deleted GPO while script is running) which could impact results
|
||||
- ☑ Other types - small color adjustment
|
||||
- ☑ Fixed/Improved `Get-GPOZaurr` - fixed unexpected ending of cmdlet when error occurs (for example deleted GPO while script is running), improved code base
|
||||
- ☑ Improved `Invoke-GPOZaurrSupport`
|
||||
## 0.0.97 - 07.12.2020
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Type `GPOList` - added more data, did small reorganization
|
||||
## 0.0.96 - 07.12.2020
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Type `GPOList` - added more data, added Optimization Step
|
||||
- ☑ Added `Set-GPOZaurrStatus`
|
||||
- ☑ Added `Optimize-GPOZaurr`
|
||||
- ☑ Fixed `Invoke-GPOZaurrPermission` which would not remove permission due to internal changes earlier on
|
||||
- ☑ Small change to `Backup-GPOZaurr`
|
||||
- ☑ Added support for `Disabled`. It's now possbile to backup `All` (default), `Empty`,`Unlinked`,`Disabled` or a mix of them
|
||||
- ☑ Removed useless `GPOPath` parameter
|
||||
## 0.0.95 - 04.12.2020
|
||||
- ☑ Fix for too big int - [#4](https://github.com/EvotecIT/GPOZaurr/issues/4) - tnx neztach
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Type `GPOList` - added ability for Exclusions
|
||||
- ☑ All other types, small improvements
|
||||
- ☑ Added HideSteps, ShowError, ShowWarning -> Disabled Warnings/Errors by default as they tend to show too much information
|
||||
- ☑ Improved `Remove-GPOZaurr` - added Exclusions
|
||||
## 0.0.93 - 03.12.2020
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Type `GPOList` reverted charts colors for entries to match colors
|
||||
- [ ] Added `Skip-GroupPolicy` to use within `Invoke-GPOZaurr`
|
||||
- ☑ Improved `Invoke-GPOZaurr` with basic support for Exclusions
|
||||
- ☑ Improved `Get-GPOZaurr` with basic support for Exclusions
|
||||
- ☑ Improved `Remove-GPOZaurrPermission` error handling
|
||||
## 0.0.92 - 01.12.2020
|
||||
- ☑ Improved `Invoke-GPOZaurrSupport`
|
||||
- ☑ Improved `Invoke-GPOZaurr`
|
||||
- ☑ Type `GPOList` improved with more data, more problems and clearer information
|
||||
- ☑ Improved `Remove-GPOZaurr`
|
||||
- ☑ Added ability do remove disabed GPO
|
||||
- ☑ Improved `Get-GPOZaurr` detecting more issues, delivering more data
|
||||
## 0.0.91 - 24.11.2020
|
||||
- ☑ Improves `Invoke-GPOZaurr` (WIP)
|
||||
- ☑ Improve Type `GPOPermissionsUnknown`
|
||||
## 0.0.90 - 23.11.2020
|
||||
- ☑ Improves `Invoke-GPOZaurr` (WIP)
|
||||
- ☑ Improves Type `GPODuplicates`
|
||||
- ☑ Fix for chart color to be RED
|
||||
- ☑ Add Type `GPOPermissionsUnknown`
|
||||
- ☑ Improves logic for Data with 0/1 element
|
||||
- ☑ Improves `Remove-GPOZaurrDuplicateObject` - removed `Confirm` requirement
|
||||
- ☑ Improves `Get-GPOZaurrNetLogon` with more verbose
|
||||
- ☑ Improves `Repair-GPOZaurrNetLogonOwner` with more verbose and fix for `LimitProcessing`
|
||||
## 0.0.89 - 22.11.2020
|
||||
- ☑ Small update `Add-GPOZaurrPermission`
|
||||
- ☑ Improves `Invoke-GPOZaurr` (WIP)
|
||||
- ☑ Added Type `GPOPermissionsAdministrative`
|
||||
## 0.0.88 - 18.11.2020
|
||||
- ☑ Fix for `Add-GPOZaurrPermission`
|
||||
## 0.0.87 - 18.11.2020
|
||||
- ☑ Improve error handling `Remove-GPOZaurrBroken`
|
||||
## 0.0.86 - 18.11.2020
|
||||
- ☑ Improve error handling `Remove-GPOZaurrBroken`
|
||||
## 0.0.85 - 17.11.2020
|
||||
- ☑ Improves `Invoke-GPOZaurr` (WIP)
|
||||
- ☑ Split `NetLogonPermissions` into `NetLogonPermissions` and `NetLogonOwners`
|
||||
- ☑ Improved type `NetLogonPermissions`
|
||||
- ☑ Improved type `NetLogonOwners`
|
||||
- ☑ Improves `Get-GPOZaurrFiles`
|
||||
- ☑ Improves `Get-GPOZaurrNetLogon`
|
||||
- ☑ Fix for `Get-GPOZaurrNetLogon`
|
||||
## 0.0.84 - 16.11.2020
|
||||
- ☑ Improves `Invoke-GPOZaurr` (WIP)
|
||||
- ☑ Type `NetLogonPermissions`
|
||||
- ☑ Fix for `Get-GPOZaurrNetLogon`
|
||||
## 0.0.83 - 14.11.2020
|
||||
- ☑ Improves `Invoke-GPOZaurr` (WIP)
|
||||
- ☑ Fix for wrong ActionRequired count
|
||||
## 0.0.82 - 14.11.2020
|
||||
- ☑ Added `Get-GPOZaurrPermissionIssue` to detect permission issue with no rights
|
||||
- ☑ Improves `Invoke-GPOZaurr` (WIP)
|
||||
- ☑ Type `GPOPermissionsRead` improved detection of problems with low permissions
|
||||
## 0.0.81 - 12.11.2020
|
||||
- ☑ Fix for `Set-GPOZaurrOwner` in case of missing permissions to not throw errors
|
||||
- ☑ Improves `Invoke-GPOZaurr` (WIP)
|
||||
- ☑ Type `GPOPermissionsRead` added
|
||||
## 0.0.80 - 12.11.2020
|
||||
- ☑ Improves `Invoke-GPOZaurr` (WIP)
|
||||
- ☑ Type `GPOOrphans` clearer options, updated texts, split per domain
|
||||
- ☑ Type `GPOOwners` clearer options, updated texts, split per domain
|
||||
- ☑ Improves `Add-GPOZaurrPermission`
|
||||
- ☑ Fixes LimitProcessing to work correctly
|
||||
- ☑ Added `All` to process all GPOs
|
||||
- ☑ Fixes `Remove-GPOZaurrPermission`
|
||||
- ☑ Improves `Set-GPOZaurrOwner`
|
||||
- ☑ Added `Force` to force `GPO Owner` to any principal (normally only Domain Admins)
|
||||
## 0.0.79 - 10.11.2020
|
||||
- Improved `Invoke-GPOZaurr` - type `GPOOrphans`
|
||||
## 0.0.78 - 10.11.2020
|
||||
- Improved `Remove-GPOZaurrBroken` more verbose
|
||||
- Improved `Get-GPOZaurrBroken` more verbose
|
||||
- Improved `Invoke-GPOZaurr` - type `GPOOrphans`
|
||||
- Improved `Invoke-GPOZaurr` - type `GPOList` - needs more work
|
||||
- Improved `Get-GPOZaurr` with better detection of Empty Policies (needs testing)
|
||||
## 0.0.77 - 9.11.2020
|
||||
- Improved `Invoke-GPOZaurr` (WIP)
|
||||
## 0.0.76 - 8.11.2020
|
||||
- Improved `Get-GPOZaurrNetLogon` to better handle errors
|
||||
## 0.0.75 - 8.11.2020
|
||||
- Improved `Get-GPOZaurrPermissionConsistency` to stop checking consistency if path doesn't exists
|
||||
## 0.0.74 - 8.11.2020
|
||||
- Improved `Invoke-GPOZaurr` (WIP)
|
||||
## 0.0.73 - 7.11.2020
|
||||
- Improved `Invoke-GPOZaurr` (WIP)
|
||||
- Improved `Get-GPOZaurr`
|
||||
## 0.0.72 - 6.11.2020
|
||||
- Improved `Invoke-GPOZaurr` (WIP)
|
||||
## 0.0.71 - 3.11.2020
|
||||
- Improved `Invoke-GPOZaurr` (WIP)
|
||||
## 0.0.70 - 29.10.2020
|
||||
- Added `Get-GPOZaurrDuplicateObject`
|
||||
- Added `Remove-GPOZaurrDuplicateObject`
|
||||
## 0.0.69 - 29.10.2020
|
||||
- Improved `Invoke-GPOZaurr` (WIP)
|
||||
- Improved `Get-GPOZaurrNetLogon`
|
||||
- Improved `Get-GPOZaurrOwner`
|
||||
- Improved `Set-GPOZaurrOwner`
|
||||
- Added `Repair-GPOZaurrNetLogonOwner`
|
||||
- Improved `Invoke-GPOZaurr` (WIP)
|
||||
## 0.0.68 - 28.10.2020
|
||||
- Renamed `Show-GPOZaurr` to `Invoke-GPOZaurr`
|
||||
- Renamed `Invoke-GPOZaurr` to `Invoke-GPOZaurrContent`
|
||||
- Improvements to `Get-GPOZaurrPermissionConsistency` - don't check for inherited permissions if top level ones are inconsistent
|
||||
- Improved `Invoke-GPOZaurr` (WIP)
|
||||
## 0.0.67 - 22.10.2020
|
||||
- Improved `Show-GPOZaurr` (WIP)
|
||||
## 0.0.66 - 22.10.2020
|
||||
- Improved `Show-GPOZaurr` (WIP)
|
||||
## 0.0.65 - 22.10.2020
|
||||
- Improved `Show-GPOZaurr` (WIP)
|
||||
## 0.0.64 - 21.10.2020
|
||||
- Renamed `Remove-GPOZaurrOrphaned` to `Remove-GPOZaurrBroken` keeping it as an alias
|
||||
- Renamed `Get-GPOZaurrSysvol` to `Get-GPOZaurrBroken` keeping it as an alias
|
||||
- Improved `Show-GPOZaurr` (WIP)
|
||||
## 0.0.63 - 19.10.2020
|
||||
- Renamed `Invoke-GPOZaurrContent` back to `Invoke-GPOZaurr`
|
||||
- Added `Show-GPOZaurr` (WIP)
|
||||
- Added `OutputType`,`OutputType`,`Open`,`Online` parameters to `Invoke-GPOZaurr`
|
||||
- Added `Get-GPOZaurrNetLogon`
|
||||
- Improved `Get-GPOZaurrOwner`
|
||||
- Fixes `Get-GPOZaurrSysvol`
|
||||
## 0.0.62 - 14.10.2020
|
||||
- Renamed `Invoke-GPOZaurr` to `Invoke-GPOZaurrContent` - I want to use `Invoke-GPOZaurr` for something else
|
||||
- Improvements to `Get-GPOZaurrPermissionConsistency` for GPOs without SYSVOL to be reported properly
|
||||
- Added `Get-GPOZaurrPermissionRoot`
|
||||
- Renamed `Remove-GPOZaurrOrphanedSysvolFolders` to `Remove-GPOZaurrOrphaned`
|
||||
- Improved `Remove-GPOZaurrOrphaned` to deal with orphaned folders but also orphaned AD GPO (No sysvol data)
|
||||
- Improved `Get-GPOZaurrSysVol` to detect orphaned SYSVOL or AD GPO objects
|
||||
- Improved `Get-GPOZaurrSysVol` to detect permissions issue when reading AD GPO objects
|
||||
- Added `Get-GPOZaurrPermissionRoot` to show which users/groups have control over all GPOs (allowed to create/modify)
|
||||
- Improved `Get-GPOZaurrPermissionSummary` to include `Get-GPOZaurrPermissionRoot` custom permissions
|
||||
- Updated `Remove-GPOZaurrPermission`
|
||||
- Updated `Get-GpoZaurrPermission`
|
||||
- Updated `Get-GPOZaurrFiles` to better handle access issue
|
||||
- Reversed parameters `Get-GPOZaurrFiles` from `Limited` to `ExtendedMetaData` and fixed missing columns
|
||||
## 0.0.61 - 31.08.2020
|
||||
- Improvement to `Get-GPOZaurrPermissionSummary`
|
||||
- Fixes to `ConvertFrom-CSExtension`
|
||||
- Fixes to `Find-CSExtension`
|
||||
## 0.0.59 - 26.08.2020
|
||||
- Improvement to `Get-GPOZaurrPermissionSummary`
|
||||
## 0.0.58 - 26.08.2020
|
||||
- Improvement to `Get-GPOZaurrPermissionSummary`
|
||||
## 0.0.57 - 26.08.2020
|
||||
- Improvement to `Get-GPOZaurrPermissionSummary`
|
||||
## 0.0.56 - 26.08.2020
|
||||
- Added `Get-GPOZaurrPermissionSummary`
|
||||
## 0.0.55 - 17.08.2020
|
||||
- Improved `Get-GPOZaurrInheritance`
|
||||
## 0.0.54 - 16.08.2020
|
||||
- Added `Invoke-GPOZaurrSupport` (WIP)
|
||||
- Added `ConvertFrom-CSExtension`
|
||||
- Added `Find-CSExtension`
|
||||
- Added `Get-GPOZaurrInheritance`
|
||||
## 0.0.53 - 16.08.2020
|
||||
- Bad release
|
||||
## 0.0.52 - 16.08.2020
|
||||
- Bad release
|
||||
## 0.0.51 - 2.08.2020
|
||||
- Updates to `Invoke-GPOZaurr` - still work in progress
|
||||
- Added `Get-GPOZaurrSysvolDFSR`
|
||||
- Added `Clear-GPOZaurrSysvolDFSR` (requires testing)
|
||||
## 0.0.50 - 29.07.2020
|
||||
- Updates to couple of commands
|
||||
## 0.0.49 - 23.07.2020
|
||||
- Hidden files were skipped - and people do crazy things with them
|
||||
## 0.0.48 - 21.07.2020
|
||||
- Added `Get-GPOZaurrFilesPolicyDefinition`
|
||||
- Updates to `Invoke-GPOZaurr` - still work in progress
|
||||
- Updates to `Get-GPOZaurrFiles` - still work in progress
|
||||
- Updates to `Remove-GPOZaurrOrphanedSysvolFolders` with backup and support for domains
|
||||
- Module will now be signed
|
||||
## 0.0.47 - 29.06.2020
|
||||
- Update to `Get-GPOZaurrAD` for better error reporting
|
||||
- Updates to `Invoke-GPOZaurr` - still work in progress
|
||||
## 0.0.46 - 28.06.2020
|
||||
- Additional protection for `Get-GPOZaurrAD` for CNF duplicates
|
||||
- Update to `Save-GPOZaurrFiles`
|
||||
- Added `Invoke-GPOZaurr` (alias: `Find-GPO`) (heavy work in progress)
|
||||
## 0.0.45 - 26.06.2020
|
||||
- During publishing ADEssentials required functions are now merged to prevent cyclic dependency bug [Using ModuleSpec syntax in RequiredModules causes incorrect "cyclic dependency" failures](https://github.com/PowerShell/PowerShell/issues/2607)
|
||||
## 0.0.44 - 24.06.2020
|
||||
- Improvement to `Get-GPOZaurrLinkSummary`
|
||||
## 0.0.43 - 21.06.2020
|
||||
- Added `Get-GPOZaurrFiles` to list files on NETLOGON/SYSVOL shares with a lot of details
|
||||
## 0.0.42 - 19.06.2020
|
||||
- Fix for `Get-GPOZaurrLink` and `SearchBase` parameter
|
||||
- Fix for `Get-GPOZaurrLink` - canonical link Trim() throwing errors if empty
|
||||
## 0.0.41 - 18.06.2020
|
||||
- Added paramerter `SkipDuplicates` to `Invoke-GPOZaurrPermission` which prevents applying permissions over and over again if 1 GPO is linked to a multiple OU's within another OU
|
||||
## 0.0.40 - 18.06.2020
|
||||
- Fix for error `Get-GPOZaurrLink` - same issue as described on my [earlier blog - Get-ADObject : The server has returned the following error: invalid enumeration context.](https://evotec.xyz/get-adobject-the-server-has-returned-the-following-error-invalid-enumeration-context/).
|
||||
- `WARNING: Get-GPOZaurrLink - Processing error The server has returned the following error: invalid enumeration context.`
|
||||
- `WARNING: Get-GPOZaurrLink - Processing error A referral was returned from the server`
|
||||
- Added `SkipDuplicates` for `Get-GPOZaurrLink`
|
||||
## 0.0.39 - 17.06.2020
|
||||
- Updates to `Invoke-GPOZaurrPermission` with new parameter `LimitAdministrativeGroupsToDomain`
|
||||
- This will get administrative based on IncludeDomains if given. It means that if GPO has Domain admins added from multiple domains it will only find one, and remove all other Domain Admins (if working with Domain Admins that is)
|
||||
## 0.0.38 - 17.06.2020
|
||||
- Update to Get-PrivGPOZaurrLink which would cause problems to `Invoke-GPOZaurrPermission` if it would be run without Administrative permission and GPO wouldn't be accessible for that user
|
||||
## 0.0.37 - 16.06.2020
|
||||
- Updates to `Invoke-GPOZaurrPermission` with new parameterset `Level`
|
||||
- Updates to `Get-GPOZaurrLinkSummary`
|
||||
## 0.0.36 - 15.06.2020
|
||||
- Initial release
|
||||
@@ -0,0 +1,73 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPOZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Export-GPOZaurrContent
|
||||
|
||||
## SYNOPSIS
|
||||
Saves GPOs to XML or HTML files.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Export-GPOZaurrContent [-FolderOutput] <String> [[-ReportType] <String>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Saves GPOs to XML or HTML files.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
An example
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -FolderOutput
|
||||
The folder where the GPOs will be saved.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: Path
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ReportType
|
||||
The type of report to generate.
|
||||
Valid values are XML or HTML.
|
||||
Default is XML.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: XML
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
## NOTES
|
||||
General notes
|
||||
|
||||
## RELATED LINKS
|
||||
+152
-146
@@ -8,7 +8,8 @@ schema: 2.0.0
|
||||
# Get-GPOZaurr
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
Gets information about all Group Policies.
|
||||
Similar to what Get-GPO provides by default.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
@@ -16,121 +17,52 @@ schema: 2.0.0
|
||||
Get-GPOZaurr [[-ExcludeGroupPolicies] <ScriptBlock>] [[-GPOName] <String>] [[-GPOGuid] <String>]
|
||||
[[-Type] <String[]>] [[-Forest] <String>] [[-ExcludeDomains] <String[]>] [[-IncludeDomains] <String[]>]
|
||||
[[-ExtendedForestInformation] <IDictionary>] [[-GPOPath] <String[]>] [-PermissionsOnly] [-OwnerOnly]
|
||||
[-Limited] [-ReturnObject] [[-ADAdministrativeGroups] <IDictionary>] [<CommonParameters>]
|
||||
[-Limited] [[-ADAdministrativeGroups] <IDictionary>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
Gets information about all Group Policies.
|
||||
Similar to what Get-GPO provides by default.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
### EXAMPLE 1
|
||||
```
|
||||
$GPOs = Get-GPOZaurr
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
$GPOs | Format-Table DisplayName, Owner, OwnerSID, OwnerType
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
$GPO = Get-GPOZaurr -GPOName 'ALL | Allow use of biometrics'
|
||||
```
|
||||
|
||||
$GPO | Format-List *
|
||||
|
||||
### EXAMPLE 3
|
||||
```
|
||||
$GPOS = Get-GPOZaurr -ExcludeGroupPolicies {
|
||||
```
|
||||
|
||||
Skip-GroupPolicy -Name 'de14_usr_std'
|
||||
Skip-GroupPolicy -Name 'de14_usr_std' -DomaiName 'ad.evotec.xyz'
|
||||
Skip-GroupPolicy -Name 'All | Trusted Websites' #-DomaiName 'ad.evotec.xyz'
|
||||
'{D39BF08A-87BF-4662-BFA0-E56240EBD5A2}'
|
||||
'COMPUTERS | Enable Sets'
|
||||
}
|
||||
$GPOS | Format-Table -AutoSize *
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ADAdministrativeGroups
|
||||
{{ Fill ADAdministrativeGroups Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 9
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeGroupPolicies
|
||||
{{ Fill ExcludeGroupPolicies Description }}
|
||||
Marks the GPO as excluded from the list.
|
||||
|
||||
```yaml
|
||||
Type: ScriptBlock
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 7
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOGuid
|
||||
{{ Fill GPOGuid Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: GUID, GPOID
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOName
|
||||
{{ Fill GPOName Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
@@ -138,14 +70,106 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOPath
|
||||
{{ Fill GPOPath Description }}
|
||||
### -GPOName
|
||||
Provide a GPOName to get information about a specific GPO.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOGuid
|
||||
Provide a GPOGuid to get information about a specific GPO.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: GUID, GPOID
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
Choose a specific type of GPO.
|
||||
Options are: 'Empty', 'Unlinked', 'Disabled', 'NoApplyPermission', 'All'.
|
||||
Default is All.
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
Target different Forest, by default current forest is used
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
Exclude domain from search, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 6
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
Include only specific domains, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 7
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
Ability to provide Forest Information from another command to speed up processing
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 8
|
||||
Default value: None
|
||||
@@ -153,53 +177,23 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
### -GPOPath
|
||||
Define GPOPath where the XML files are located to be analyzed instead of asking Active Directory
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 6
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Limited
|
||||
{{ Fill Limited Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -OwnerOnly
|
||||
{{ Fill OwnerOnly Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Position: 9
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -PermissionsOnly
|
||||
{{ Fill PermissionsOnly Description }}
|
||||
Only show permissions, by default all information is shown
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
@@ -208,13 +202,13 @@ Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ReturnObject
|
||||
{{ Fill ReturnObject Description }}
|
||||
### -OwnerOnly
|
||||
only show owner information, by default all information is shown
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
@@ -223,22 +217,36 @@ Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
{{ Fill Type Description }}
|
||||
### -Limited
|
||||
Provide limited output without analyzing XML data
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: Empty, Unlinked, Disabled, All
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ADAdministrativeGroups
|
||||
Ability to provide ADAdministrativeGroups from different function to speed up processing
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 10
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
@@ -249,11 +257,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
General notes
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
@@ -15,18 +15,21 @@ schema: 2.0.0
|
||||
### Default (Default)
|
||||
```
|
||||
Get-GPOZaurrAD [-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDomains <String[]>]
|
||||
[-DateFrom <DateTime>] [-DateTo <DateTime>] [-DateRange <String>] [-DateProperty <String[]>]
|
||||
[-ExtendedForestInformation <IDictionary>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### GPOName
|
||||
```
|
||||
Get-GPOZaurrAD [-GPOName <String>] [-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDomains <String[]>]
|
||||
[-DateFrom <DateTime>] [-DateTo <DateTime>] [-DateRange <String>] [-DateProperty <String[]>]
|
||||
[-ExtendedForestInformation <IDictionary>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### GPOGUID
|
||||
```
|
||||
Get-GPOZaurrAD [-GPOGuid <String>] [-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDomains <String[]>]
|
||||
[-DateFrom <DateTime>] [-DateTo <DateTime>] [-DateRange <String>] [-DateProperty <String[]>]
|
||||
[-ExtendedForestInformation <IDictionary>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
@@ -44,6 +47,68 @@ PS C:\> {{ Add example code here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -DateFrom
|
||||
{{ Fill DateFrom Description }}
|
||||
|
||||
```yaml
|
||||
Type: DateTime
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DateProperty
|
||||
{{ Fill DateProperty Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: WhenCreated, WhenChanged
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DateRange
|
||||
{{ Fill DateRange Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: PastHour, CurrentHour, PastDay, CurrentDay, PastMonth, CurrentMonth, PastQuarter, CurrentQuarter, Last14Days, Last21Days, Last30Days, Last7Days, Last3Days, Last1Days
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DateTo
|
||||
{{ Fill DateTo Description }}
|
||||
|
||||
```yaml
|
||||
Type: DateTime
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
|
||||
+84
-94
@@ -8,32 +8,51 @@ schema: 2.0.0
|
||||
# Get-GPOZaurrBroken
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
Detects broken or otherwise damaged Group Policies
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-GPOZaurrBroken [[-Forest] <String>] [[-ExcludeDomains] <String[]>] [[-ExcludeDomainControllers] <String[]>]
|
||||
[[-IncludeDomains] <String[]>] [[-IncludeDomainControllers] <String[]>] [-SkipRODC] [[-GPOs] <Array>]
|
||||
[[-IncludeDomains] <String[]>] [[-IncludeDomainControllers] <String[]>] [-SkipRODC]
|
||||
[[-ExtendedForestInformation] <IDictionary>] [-VerifyDomainControllers] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
Detects broken or otherwise damaged Group Policies providing insight whether GPO exists in both AD and SYSVOL.
|
||||
It provides few statuses:
|
||||
- Permissions issue - means account couldn't read GPO due to permissions
|
||||
- ObjectClass issue - means that ObjectClass is of type Container, rather than expected groupPolicyContainer
|
||||
- Not available on SYSVOL - means SYSVOL data is missing, yet AD metadata is available
|
||||
- Not available in AD - means AD metadata is missing, yet SYSVOL data is available
|
||||
- Exists - means AD metadata and SYSVOL data are available
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-GPOZaurrBroken -Verbose | Format-Table
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ExcludeDomainControllers
|
||||
{{ Fill ExcludeDomainControllers Description }}
|
||||
### -Forest
|
||||
Target different Forest, by default current forest is used
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
Exclude domain from search, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
@@ -47,8 +66,9 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
### -ExcludeDomainControllers
|
||||
Exclude specific domain controllers, by default there are no exclusions, as long as VerifyDomainControllers switch is enabled.
|
||||
Otherwise this parameter is ignored.
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
@@ -56,14 +76,61 @@ Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
Include only specific domains, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomainControllers
|
||||
Include only specific domain controllers, by default all domain controllers are included, as long as VerifyDomainControllers switch is enabled.
|
||||
Otherwise this parameter is ignored.
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: DomainControllers
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipRODC
|
||||
Skip Read-Only Domain Controllers.
|
||||
By default all domain controllers are included.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
Ability to provide Forest Information from another command to speed up processing
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
@@ -77,83 +144,8 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOs
|
||||
{{ Fill GPOs Description }}
|
||||
|
||||
```yaml
|
||||
Type: Array
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomainControllers
|
||||
{{ Fill IncludeDomainControllers Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: DomainControllers
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipRODC
|
||||
{{ Fill SkipRODC Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -VerifyDomainControllers
|
||||
{{ Fill VerifyDomainControllers Description }}
|
||||
Forces cmdlet to check GPO Existance on Domain Controllers rather then per domain
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
@@ -162,7 +154,7 @@ Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
@@ -172,11 +164,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
General notes
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPOZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-GPOZaurrBrokenLink
|
||||
|
||||
## SYNOPSIS
|
||||
Finds any GPO link that doesn't have a matching GPO (already removed GPO).
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-GPOZaurrBrokenLink [[-Forest] <String>] [[-ExcludeDomains] <String[]>] [[-IncludeDomains] <String[]>]
|
||||
[[-ExtendedForestInformation] <IDictionary>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Finds any GPO link that doesn't have a matching GPO (already removed GPO).
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-GPOZaurrBrokenLink -Verbose | Format-Table -AutoSize *
|
||||
```
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Get-GPOZaurrBrokenLink -Verbose -IncludeDomains ad.evotec.pl | Format-Table -AutoSize *
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Forest
|
||||
Target different Forest, by default current forest is used
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
Exclude domain from search, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
Include only specific domains, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
Ability to provide Forest Information from another command to speed up processing
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
## NOTES
|
||||
General notes
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -8,32 +8,96 @@ schema: 2.0.0
|
||||
# Get-GPOZaurrInheritance
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
Short description
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-GPOZaurrInheritance [-IncludeBlockedObjects] [-OnlyBlockedInheritance] [[-Forest] <String>]
|
||||
Get-GPOZaurrInheritance [-IncludeBlockedObjects] [-OnlyBlockedInheritance] [-IncludeExcludedObjects]
|
||||
[-IncludeGroupPoliciesForBlockedObjects] [[-Exclusions] <String[]>] [[-Forest] <String>]
|
||||
[[-ExcludeDomains] <String[]>] [[-IncludeDomains] <String[]>] [[-ExtendedForestInformation] <IDictionary>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
Long description
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
### EXAMPLE 1
|
||||
```
|
||||
$Objects = Get-GPOZaurrInheritance -IncludeBlockedObjects -IncludeExcludedObjects -OnlyBlockedInheritance -Exclusions $ExcludedOU
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
$Objects | Format-Table
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
### -IncludeBlockedObjects
|
||||
Include OU's with blocked inheritance.
|
||||
Default disabled
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -OnlyBlockedInheritance
|
||||
Show only OU's with blocked inheritance
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeExcludedObjects
|
||||
Show excluded objets.
|
||||
Default disabled
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeGroupPoliciesForBlockedObjects
|
||||
{{ Fill IncludeGroupPoliciesForBlockedObjects Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Exclusions
|
||||
Provide exclusions for OU's approved by IT.
|
||||
You can provide OU by canonical name or distinguishedName
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
@@ -47,11 +111,26 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
### -Forest
|
||||
Target different Forest, by default current forest is used
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
Exclude domain from search, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
@@ -62,38 +141,8 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeBlockedObjects
|
||||
{{ Fill IncludeBlockedObjects Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
Include only specific domains, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
@@ -101,22 +150,22 @@ Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -OnlyBlockedInheritance
|
||||
{{ Fill OnlyBlockedInheritance Description }}
|
||||
### -ExtendedForestInformation
|
||||
Ability to provide Forest Information from another command to speed up processing
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
@@ -127,11 +176,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
General notes
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
@@ -12,24 +12,32 @@ schema: 2.0.0
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Linked (Default)
|
||||
```
|
||||
Get-GPOZaurrLink [-Linked <String[]>] [-Limited] [-SkipDuplicates] [-GPOCache <IDictionary>] [-Forest <String>]
|
||||
[-ExcludeDomains <String[]>] [-IncludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>]
|
||||
[-AsHashTable] [-Summary] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### ADObject
|
||||
```
|
||||
Get-GPOZaurrLink -ADObject <ADObject[]> [-Limited] [-SkipDuplicates] [-GPOCache <IDictionary>]
|
||||
[-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDomains <String[]>]
|
||||
[-ExtendedForestInformation <IDictionary>] [<CommonParameters>]
|
||||
[-ExtendedForestInformation <IDictionary>] [-AsHashTable] [-Summary] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### Filter
|
||||
```
|
||||
Get-GPOZaurrLink [-Filter <String>] [-SearchBase <String>] [-SearchScope <ADSearchScope>] [-Limited]
|
||||
[-SkipDuplicates] [-GPOCache <IDictionary>] [-Forest <String>] [-ExcludeDomains <String[]>]
|
||||
[-IncludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>] [<CommonParameters>]
|
||||
[-IncludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>] [-AsHashTable] [-Summary]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
### Linked
|
||||
### Site
|
||||
```
|
||||
Get-GPOZaurrLink -Linked <String> [-Limited] [-SkipDuplicates] [-GPOCache <IDictionary>] [-Forest <String>]
|
||||
[-ExcludeDomains <String[]>] [-IncludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>]
|
||||
Get-GPOZaurrLink [-Site <String[]>] [-GPOCache <IDictionary>] [-Forest <String>] [-ExcludeDomains <String[]>]
|
||||
[-IncludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>] [-AsHashTable] [-Summary]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
@@ -62,6 +70,21 @@ Accept pipeline input: True (ByPropertyName, ByValue)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -AsHashTable
|
||||
{{ Fill AsHashTable Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
@@ -157,7 +180,7 @@ Accept wildcard characters: False
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Parameter Sets: Linked, ADObject, Filter
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
@@ -171,12 +194,12 @@ Accept wildcard characters: False
|
||||
{{ Fill Linked Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Type: String[]
|
||||
Parameter Sets: Linked
|
||||
Aliases:
|
||||
Accepted values: Root, DomainControllers, Site, Other
|
||||
Accepted values: All, Root, DomainControllers, Site, OrganizationalUnit
|
||||
|
||||
Required: True
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
@@ -214,9 +237,39 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Site
|
||||
{{ Fill Site Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: Site
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipDuplicates
|
||||
{{ Fill SkipDuplicates Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: Linked, ADObject, Filter
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Summary
|
||||
{{ Fill Summary Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPOZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-GPOZaurrOrganizationalUnit
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-GPOZaurrOrganizationalUnit [[-Forest] <String>] [[-ExcludeDomains] <String[]>]
|
||||
[[-IncludeDomains] <String[]>] [[-ExtendedForestInformation] <IDictionary>] [[-Option] <String[]>]
|
||||
[[-ExcludeOrganizationalUnit] <String[]>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeOrganizationalUnit
|
||||
{{ Fill ExcludeOrganizationalUnit Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: ExcludeOU, Exclusions
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Option
|
||||
{{ Fill Option Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: OK, Unlink, Delete
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -16,21 +16,21 @@ Gets owners of GPOs from Active Directory and SYSVOL
|
||||
```
|
||||
Get-GPOZaurrOwner [-IncludeSysvol] [-SkipBroken] [-Forest <String>] [-ExcludeDomains <String[]>]
|
||||
[-IncludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>]
|
||||
[-ADAdministrativeGroups <IDictionary>] [<CommonParameters>]
|
||||
[-ADAdministrativeGroups <IDictionary>] [-ApprovedOwner <String[]>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### GPOName
|
||||
```
|
||||
Get-GPOZaurrOwner [-GPOName <String>] [-IncludeSysvol] [-SkipBroken] [-Forest <String>]
|
||||
[-ExcludeDomains <String[]>] [-IncludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>]
|
||||
[-ADAdministrativeGroups <IDictionary>] [<CommonParameters>]
|
||||
[-ADAdministrativeGroups <IDictionary>] [-ApprovedOwner <String[]>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### GPOGUID
|
||||
```
|
||||
Get-GPOZaurrOwner [-GPOGuid <String>] [-IncludeSysvol] [-SkipBroken] [-Forest <String>]
|
||||
[-ExcludeDomains <String[]>] [-IncludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>]
|
||||
[-ADAdministrativeGroups <IDictionary>] [<CommonParameters>]
|
||||
[-ADAdministrativeGroups <IDictionary>] [-ApprovedOwner <String[]>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
@@ -187,6 +187,21 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ApprovedOwner
|
||||
Ability to provide different owner (non administrative that still is approved for use)
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Exclusion, Exclusions
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPOZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-GPOZaurrPermissionAnalysis
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-GPOZaurrPermissionAnalysis [[-Forest] <String>] [[-ExcludeDomains] <String[]>]
|
||||
[[-IncludeDomains] <String[]>] [[-Permissions] <Array>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Permissions
|
||||
{{ Fill Permissions Description }}
|
||||
|
||||
```yaml
|
||||
Type: Array
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -8,7 +8,7 @@ schema: 2.0.0
|
||||
# Get-GPOZaurrSysvolDFSR
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
Gets DFSR information from the SYSVOL DFSR
|
||||
|
||||
## SYNTAX
|
||||
|
||||
@@ -20,21 +20,36 @@ Get-GPOZaurrSysvolDFSR [[-Forest] <String>] [[-ExcludeDomains] <String[]>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
Gets DFSR information from the SYSVOL DFSR
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
### EXAMPLE 1
|
||||
```
|
||||
$DFSR = Get-GPOZaurrSysvolDFSR
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
$DFSR | Format-Table *
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ExcludeDomainControllers
|
||||
{{ Fill ExcludeDomainControllers Description }}
|
||||
### -Forest
|
||||
Target different Forest, by default current forest is used
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
Exclude domain from search, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
@@ -48,74 +63,15 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
### -ExcludeDomainControllers
|
||||
Exclude specific domain controllers, by default there are no exclusions, as long as VerifyDomainControllers switch is enabled.
|
||||
Otherwise this parameter is ignored.
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomainControllers
|
||||
{{ Fill IncludeDomainControllers Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: DomainControllers
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
@@ -123,11 +79,58 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SearchDFSR
|
||||
{{ Fill SearchDFSR Description }}
|
||||
### -IncludeDomains
|
||||
Include only specific domains, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomainControllers
|
||||
Include only specific domain controllers, by default all domain controllers are included, as long as VerifyDomainControllers switch is enabled.
|
||||
Otherwise this parameter is ignored.
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: DomainControllers
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipRODC
|
||||
Skip Read-Only Domain Controllers.
|
||||
By default all domain controllers are included.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
Ability to provide Forest Information from another command to speed up processing
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
@@ -138,17 +141,18 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipRODC
|
||||
{{ Fill SkipRODC Description }}
|
||||
### -SearchDFSR
|
||||
Define DFSR Share.
|
||||
By default it uses SYSVOL Share
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Position: 7
|
||||
Default value: SYSVOL Share
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
@@ -158,11 +162,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
General notes
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPOZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-GPOZaurrUpdates
|
||||
|
||||
## SYNOPSIS
|
||||
Gets the list of GPOs created or updated in the last X number of days.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### DateRange (Default)
|
||||
```
|
||||
Get-GPOZaurrUpdates [-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDomains <String[]>]
|
||||
-DateRange <String> [-DateProperty <String[]>] [-ExtendedForestInformation <IDictionary>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### Dates
|
||||
```
|
||||
Get-GPOZaurrUpdates [-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDomains <String[]>]
|
||||
-DateFrom <DateTime> -DateTo <DateTime> [-DateProperty <String[]>] [-ExtendedForestInformation <IDictionary>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Gets the list of GPOs created or updated in the last X number of days.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Get-GPOZaurrUpdates -DateRange Last14Days -DateProperty WhenCreated, WhenChanged -Verbose -IncludeDomains 'ad.evotec.pl' | Format-List
|
||||
```
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Get-GPOZaurrUpdates -DateRange Last14Days -DateProperty WhenCreated -Verbose | Format-Table
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Forest
|
||||
Target different Forest, by default current forest is used
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
Exclude domain from search, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
Include only specific domains, by default whole forest is scanned
|
||||
ą
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DateFrom
|
||||
Provide a date from which to start the search, by default the last X days are used
|
||||
|
||||
```yaml
|
||||
Type: DateTime
|
||||
Parameter Sets: Dates
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DateTo
|
||||
Provide a date to which to end the search, by default the last X days are used
|
||||
|
||||
```yaml
|
||||
Type: DateTime
|
||||
Parameter Sets: Dates
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DateRange
|
||||
Provide a date range to search for, by default the last X days are used
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: DateRange
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DateProperty
|
||||
Choose a date property.
|
||||
It can be WhenCreated or WhenChanged or both.
|
||||
By default whenCreated is used for comparison purposes
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: WhenCreated
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
Ability to provide Forest Information from another command to speed up processing
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
## NOTES
|
||||
General notes
|
||||
|
||||
## RELATED LINKS
|
||||
+130
-89
@@ -8,62 +8,57 @@ schema: 2.0.0
|
||||
# Invoke-GPOZaurr
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
Single cmdlet that provides 360 degree overview of Group Policies in Active Directory Forest.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Invoke-GPOZaurr [[-ExcludeGroupPolicies] <ScriptBlock>] [-FilePath <String>] [[-Type] <String[]>] [-PassThru]
|
||||
[-HideHTML] [-HideSteps] [-ShowError] [-ShowWarning] [-Forest <String>] [-ExcludeDomains <String[]>]
|
||||
[-IncludeDomains <String[]>] [<CommonParameters>]
|
||||
Invoke-GPOZaurr [[-Exclusions] <Object>] [-FilePath <String>] [[-Type] <String[]>] [-PassThru] [-HideHTML]
|
||||
[-HideSteps] [-ShowError] [-ShowWarning] [-Forest <String>] [-ExcludeDomains <String[]>]
|
||||
[-IncludeDomains <String[]>] [-Online] [-SplitReports] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
Single cmdlet that provides 360 degree overview of Group Policies in Active Directory Forest with ability to pick reports and export to HTML.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Invoke-GPOZaurr
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Invoke-GPOZaurr -Type GPOOrganizationalUnit -Online -FilePath $PSScriptRoot\Reports\GPOZaurrOU.html -Exclusions @(
|
||||
```
|
||||
|
||||
'*OU=Production,DC=ad,DC=evotec,DC=pl'
|
||||
)
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
### -Exclusions
|
||||
Allows to mark as excluded some Group Policies or Organizational Units depending on type.
|
||||
Can be a scriptblock or array depending on supported way by underlying report.
|
||||
Not every report support exclusions.
|
||||
Not every report support exclusions the same way.
|
||||
Exclusions should be used only if there is single report being asked for.
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Type: Object
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Aliases: ExcludeGroupPolicies, ExclusionsCode
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeGroupPolicies
|
||||
{{ Fill ExcludeGroupPolicies Description }}
|
||||
|
||||
```yaml
|
||||
Type: ScriptBlock
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -FilePath
|
||||
{{ Fill FilePath Description }}
|
||||
Path to the file where the report will be saved.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
@@ -77,8 +72,100 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
Type of report to be generated from a list of available reports.
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -PassThru
|
||||
Returns created objects after the report is done
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -HideHTML
|
||||
Do not auto open HTML report in default browser
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -HideSteps
|
||||
Do not show steps in report
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ShowError
|
||||
Show errors in HTML report.
|
||||
Useful in case the report is being run as Scheduled Task
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ShowWarning
|
||||
Show warnings in HTML report.
|
||||
Useful in case the report is being run as Scheduled Task
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
Target different Forest, by default current forest is used
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
@@ -92,26 +179,11 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -HideHTML
|
||||
{{ Fill HideHTML Description }}
|
||||
### -ExcludeDomains
|
||||
Exclude domain from search, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -HideSteps
|
||||
{{ Fill HideSteps Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
@@ -123,7 +195,7 @@ Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
Include only specific domains, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
@@ -137,8 +209,8 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -PassThru
|
||||
{{ Fill PassThru Description }}
|
||||
### -Online
|
||||
Forces report to use online resources in HTML (using CDN most of the time), by default it is run offline, and inlines all CSS/JS code.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
@@ -147,13 +219,14 @@ Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ShowError
|
||||
{{ Fill ShowError Description }}
|
||||
### -SplitReports
|
||||
Split report into multiple files, one for each report.
|
||||
This can be useful for large domains with huge reports.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
@@ -162,37 +235,7 @@ Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ShowWarning
|
||||
{{ Fill ShowWarning Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
{{ Fill Type Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
@@ -202,11 +245,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
General notes
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
@@ -298,7 +298,7 @@ Accept wildcard characters: False
|
||||
Type: String
|
||||
Parameter Sets: Linked
|
||||
Aliases:
|
||||
Accepted values: Root, DomainControllers, Site, Other
|
||||
Accepted values: Root, DomainControllers, Site, OrganizationalUnit
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
|
||||
@@ -14,7 +14,7 @@ schema: 2.0.0
|
||||
|
||||
```
|
||||
Invoke-GPOZaurrSupport [[-Type] <String>] [[-ComputerName] <String>] [[-UserName] <String>] [[-Path] <String>]
|
||||
[[-Splitter] <String>] [-PreventShow] [-Offline] [-ForceGPResult] [<CommonParameters>]
|
||||
[[-Splitter] <String>] [-PreventShow] [-Online] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
@@ -46,23 +46,8 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ForceGPResult
|
||||
{{ Fill ForceGPResult Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Offline
|
||||
{{ Fill Offline Description }}
|
||||
### -Online
|
||||
{{ Fill Online Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
|
||||
+32
-7
@@ -26,11 +26,15 @@ Provides Backup functionality to Group Policies
|
||||
### [ConvertFrom-CSExtension](ConvertFrom-CSExtension.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Export-GPOZaurrContent](Export-GPOZaurrContent.md)
|
||||
Saves GPOs to XML or HTML files.
|
||||
|
||||
### [Find-CSExtension](Find-CSExtension.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Get-GPOZaurr](Get-GPOZaurr.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
Gets information about all Group Policies.
|
||||
Similar to what Get-GPO provides by default.
|
||||
|
||||
### [Get-GPOZaurrAD](Get-GPOZaurrAD.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
@@ -39,7 +43,10 @@ Provides Backup functionality to Group Policies
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Get-GPOZaurrBroken](Get-GPOZaurrBroken.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
Detects broken or otherwise damaged Group Policies
|
||||
|
||||
### [Get-GPOZaurrBrokenLink](Get-GPOZaurrBrokenLink.md)
|
||||
Finds any GPO link that doesn't have a matching GPO (already removed GPO).
|
||||
|
||||
### [Get-GPOZaurrDictionary](Get-GPOZaurrDictionary.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
@@ -57,7 +64,7 @@ Provides Backup functionality to Group Policies
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Get-GPOZaurrInheritance](Get-GPOZaurrInheritance.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
Short description
|
||||
|
||||
### [Get-GPOZaurrLegacyFiles](Get-GPOZaurrLegacyFiles.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
@@ -71,6 +78,9 @@ Provides Backup functionality to Group Policies
|
||||
### [Get-GPOZaurrNetLogon](Get-GPOZaurrNetLogon.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Get-GPOZaurrOrganizationalUnit](Get-GPOZaurrOrganizationalUnit.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Get-GPOZaurrOwner](Get-GPOZaurrOwner.md)
|
||||
Gets owners of GPOs from Active Directory and SYSVOL
|
||||
|
||||
@@ -80,6 +90,9 @@ Tries to find CPassword in Group Policies or given path and translate it to read
|
||||
### [Get-GPOZaurrPermission](Get-GPOZaurrPermission.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Get-GPOZaurrPermissionAnalysis](Get-GPOZaurrPermissionAnalysis.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Get-GPOZaurrPermissionConsistency](Get-GPOZaurrPermissionConsistency.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
@@ -93,13 +106,16 @@ Detects Group Policy missing Authenticated Users permission while not having hig
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Get-GPOZaurrSysvolDFSR](Get-GPOZaurrSysvolDFSR.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
Gets DFSR information from the SYSVOL DFSR
|
||||
|
||||
### [Get-GPOZaurrUpdates](Get-GPOZaurrUpdates.md)
|
||||
Gets the list of GPOs created or updated in the last X number of days.
|
||||
|
||||
### [Get-GPOZaurrWMI](Get-GPOZaurrWMI.md)
|
||||
Get Group Policy WMI filter
|
||||
|
||||
### [Invoke-GPOZaurr](Invoke-GPOZaurr.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
Single cmdlet that provides 360 degree overview of Group Policies in Active Directory Forest.
|
||||
|
||||
### [Invoke-GPOZaurrContent](Invoke-GPOZaurrContent.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
@@ -123,7 +139,7 @@ Enables or disables user/computer section of group policy based on it's content.
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Remove-GPOZaurrBroken](Remove-GPOZaurrBroken.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
Finds and removes broken Group Policies from SYSVOL or AD or both.
|
||||
|
||||
### [Remove-GPOZaurrDuplicateObject](Remove-GPOZaurrDuplicateObject.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
@@ -134,13 +150,22 @@ Enables or disables user/computer section of group policy based on it's content.
|
||||
### [Remove-GPOZaurrLegacyFiles](Remove-GPOZaurrLegacyFiles.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Remove-GPOZaurrLinkEmptyOU](Remove-GPOZaurrLinkEmptyOU.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Remove-GPOZaurrPermission](Remove-GPOZaurrPermission.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Remove-GPOZaurrWMI](Remove-GPOZaurrWMI.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Repair-GPOZaurrBrokenLink](Repair-GPOZaurrBrokenLink.md)
|
||||
Removes any link to GPO that no longer exists.
|
||||
|
||||
### [Repair-GPOZaurrNetLogonOwner](Repair-GPOZaurrNetLogonOwner.md)
|
||||
Sets new owner to each file in NetLogon share.
|
||||
|
||||
### [Repair-GPOZaurrPermission](Repair-GPOZaurrPermission.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Repair-GPOZaurrPermissionConsistency](Repair-GPOZaurrPermissionConsistency.md)
|
||||
@@ -150,7 +175,7 @@ Enables or disables user/computer section of group policy based on it's content.
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
### [Save-GPOZaurrFiles](Save-GPOZaurrFiles.md)
|
||||
{{ Fill in the Synopsis }}
|
||||
Exports GPO XML data to files and saves it to a given path
|
||||
|
||||
### [Set-GPOOwner](Set-GPOOwner.md)
|
||||
Used within Invoke-GPOZaurrPermission only.
|
||||
|
||||
+17
-2
@@ -16,7 +16,7 @@ schema: 2.0.0
|
||||
Remove-GPOZaurr [[-ExcludeGroupPolicies] <ScriptBlock>] [-Type] <String[]> [-LimitProcessing <Int32>]
|
||||
[-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDomains <String[]>]
|
||||
[-ExtendedForestInformation <IDictionary>] [-GPOPath <String[]>] [-BackupPath <String>] [-BackupDated]
|
||||
[-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
[-RequireDays <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
@@ -183,6 +183,21 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -RequireDays
|
||||
{{ Fill RequireDays Description }}
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
{{ Fill Type Description }}
|
||||
|
||||
@@ -190,7 +205,7 @@ Accept wildcard characters: False
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: Empty, Unlinked, Disabled
|
||||
Accepted values: Empty, Unlinked, Disabled, NoApplyPermission
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
|
||||
@@ -8,35 +8,63 @@ schema: 2.0.0
|
||||
# Remove-GPOZaurrBroken
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
Finds and removes broken Group Policies from SYSVOL or AD or both.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Remove-GPOZaurrBroken [[-Type] <String[]>] [[-BackupPath] <String>] [-BackupDated] [[-LimitProcessing] <Int32>]
|
||||
[[-Forest] <String>] [[-ExcludeDomains] <String[]>] [[-IncludeDomains] <String[]>]
|
||||
[[-ExtendedForestInformation] <IDictionary>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
Remove-GPOZaurrBroken [-Type] <String[]> [-BackupPath <String>] [-BackupDated] [-LimitProcessing <Int32>]
|
||||
[-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDomains <String[]>]
|
||||
[-ExtendedForestInformation <IDictionary>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
Finds and removes broken Group Policies from SYSVOL or AD or both.
|
||||
Assesment is based on Get-GPOZaurrBroken and there are 3 supported types:
|
||||
- AD - meaning GPOs which have no SYSVOL content will be deleted from AD
|
||||
- SYSVOL - meaning GPOs which have no AD content will be deleted from SYSVOL
|
||||
- ObjectClass - meaning GPOs which have ObjectClass category of Container rather than groupPolicyContainer will be deleted from AD & SYSVOL
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Remove-GPOZaurrBroken -Verbose -WhatIf -Type AD, SYSVOL
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Remove-GPOZaurrBroken -Verbose -WhatIf -Type AD, SYSVOL -IncludeDomains 'ad.evotec.pl' -LimitProcessing 2
|
||||
```
|
||||
|
||||
### EXAMPLE 3
|
||||
```
|
||||
Remove-GPOZaurrBroken -Verbose -IncludeDomains 'ad.evotec.xyz' -BackupPath $Env:UserProfile\Desktop\MyBackup1 -WhatIf -Type AD, SYSVOL
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -BackupDated
|
||||
{{ Fill BackupDated Description }}
|
||||
### -Type
|
||||
Choose one or more types to delete.
|
||||
Options are AD, ObjectClass, SYSVOL
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -BackupPath
|
||||
Path to optional backup of SYSVOL content before deletion
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
@@ -47,28 +75,44 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -BackupPath
|
||||
{{ Fill BackupPath Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
### -BackupDated
|
||||
Forces backup to be created within folder that has date in it
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -LimitProcessing
|
||||
Allows to specify maximum number of items that will be fixed in a single run.
|
||||
It doesn't affect amount of GPOs processed
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: 2147483647
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
Target different Forest, by default current forest is used
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
@@ -78,7 +122,7 @@ Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
Exclude domain from search, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
@@ -86,44 +130,14 @@ Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 6
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
Include only specific domains, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
@@ -131,38 +145,22 @@ Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -LimitProcessing
|
||||
{{ Fill LimitProcessing Description }}
|
||||
### -ExtendedForestInformation
|
||||
Ability to provide Forest Information from another command to speed up processing
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
{{ Fill Type Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: SYSVOL, AD
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
@@ -184,16 +182,29 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
General notes
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPOZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Remove-GPOZaurrLinkEmptyOU
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Remove-GPOZaurrLinkEmptyOU [[-Forest] <String>] [[-ExcludeDomains] <String[]>] [[-IncludeDomains] <String[]>]
|
||||
[[-ExtendedForestInformation] <IDictionary>] [[-ExcludeOrganizationalUnit] <String[]>]
|
||||
[[-LimitProcessing] <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeOrganizationalUnit
|
||||
{{ Fill ExcludeOrganizationalUnit Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -LimitProcessing
|
||||
{{ Fill LimitProcessing Description }}
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -WhatIf
|
||||
Shows what would happen if the cmdlet runs.
|
||||
The cmdlet is not run.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: wi
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,156 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPOZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Repair-GPOZaurrBrokenLink
|
||||
|
||||
## SYNOPSIS
|
||||
Removes any link to GPO that no longer exists.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Repair-GPOZaurrBrokenLink [[-Forest] <String>] [[-ExcludeDomains] <String[]>] [[-IncludeDomains] <String[]>]
|
||||
[[-ExtendedForestInformation] <IDictionary>] [[-LimitProcessing] <Int32>] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Removes any link to GPO that no longer exists.
|
||||
It scans all site, organizational unit or domain root making sure every single link that may be linking to GPO that doesn't exists anymore is gone.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Repair-GPOZaurrBrokenLink -Verbose -LimitProcessing 1 -WhatIf
|
||||
```
|
||||
|
||||
### EXAMPLE 2
|
||||
```
|
||||
Repair-GPOZaurrBrokenLink -Verbose -IncludeDomains ad.evotec.pl -LimitProcessing 1 -WhatIf
|
||||
```
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Forest
|
||||
Target different Forest, by default current forest is used
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
Exclude domain from search, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
Include only specific domains, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
Ability to provide Forest Information from another command to speed up processing
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -LimitProcessing
|
||||
Allows to specify maximum number of items that will be fixed in a single run.
|
||||
It doesn't affect amount of GPOs processed
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: 0
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -WhatIf
|
||||
Shows what would happen if the cmdlet runs.
|
||||
The cmdlet is not run.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: wi
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
## NOTES
|
||||
General notes
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -8,7 +8,7 @@ schema: 2.0.0
|
||||
# Repair-GPOZaurrNetLogonOwner
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
Sets new owner to each file in NetLogon share.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
@@ -19,41 +19,24 @@ Repair-GPOZaurrNetLogonOwner [[-Forest] <String>] [[-ExcludeDomains] <String[]>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
Sets new owner to each file in NetLogon share.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Repair-GPOZaurrNetLogonOwner -WhatIf -Verbose -IncludeDomains ad.evotec.pl
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
### -Forest
|
||||
Target different Forest, by default current forest is used
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
@@ -62,43 +45,13 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
### -ExcludeDomains
|
||||
Exclude domain from search, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
@@ -107,23 +60,39 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -LimitProcessing
|
||||
{{ Fill LimitProcessing Description }}
|
||||
### -IncludeDomains
|
||||
Include only specific domains, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
Ability to provide Forest Information from another command to speed up processing
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Principal
|
||||
{{ Fill Principal Description }}
|
||||
Provide named owner.
|
||||
If not provided default S-1-5-32-544 is used.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
@@ -131,8 +100,24 @@ Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Position: 5
|
||||
Default value: S-1-5-32-544
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -LimitProcessing
|
||||
Allows to specify maximum number of items that will be fixed in a single run.
|
||||
It doesn't affect amount of GPOs processed
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 6
|
||||
Default value: 2147483647
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
@@ -153,16 +138,29 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
General notes
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPOZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Repair-GPOZaurrPermission
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Repair-GPOZaurrPermission [-Type] <String[]> [[-Forest] <String>] [[-ExcludeDomains] <String[]>]
|
||||
[[-IncludeDomains] <String[]>] [[-ExtendedForestInformation] <IDictionary>] [[-LimitProcessing] <Int32>]
|
||||
[-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -LimitProcessing
|
||||
{{ Fill LimitProcessing Description }}
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
{{ Fill Type Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: AuthenticatedUsers, Unknown, System, Administrative, All
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -WhatIf
|
||||
Shows what would happen if the cmdlet runs.
|
||||
The cmdlet is not run.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: wi
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
+50
-54
@@ -8,7 +8,7 @@ schema: 2.0.0
|
||||
# Save-GPOZaurrFiles
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
Exports GPO XML data to files and saves it to a given path
|
||||
|
||||
## SYNTAX
|
||||
|
||||
@@ -18,41 +18,24 @@ Save-GPOZaurrFiles [[-Forest] <String>] [[-ExcludeDomains] <String[]>] [[-Includ
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
Exports GPO XML data to files and saves it to a given path
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
### EXAMPLE 1
|
||||
```
|
||||
Save-GPOZaurrFiles -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPOExportEvotec' -DeleteExisting -Verbose
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -DeleteExisting
|
||||
{{ Fill DeleteExisting Description }}
|
||||
### -Forest
|
||||
Target different Forest, by default current forest is used
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
@@ -61,14 +44,29 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
### -ExcludeDomains
|
||||
Exclude domain from search, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
Include only specific domains, by default whole forest is scanned
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
@@ -76,26 +74,11 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
### -ExtendedForestInformation
|
||||
Ability to provide Forest Information from another command to speed up processing
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOPath
|
||||
{{ Fill GPOPath Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
@@ -106,31 +89,44 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
### -GPOPath
|
||||
Path where to save XML files from GPOReport
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DeleteExisting
|
||||
Delete existing files before saving new ones
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: False
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
General notes
|
||||
|
||||
## RELATED LINKS
|
||||
|
||||
@@ -16,14 +16,15 @@ Sets GPO Owner to Domain Admins or other choosen account
|
||||
```
|
||||
Set-GPOZaurrOwner -Type <String> [-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDomains <String[]>]
|
||||
[-ExtendedForestInformation <IDictionary>] [-Principal <String>] [-SkipSysvol] [-LimitProcessing <Int32>]
|
||||
[-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
[-ApprovedOwner <String[]>] [-Action <String>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### Named
|
||||
```
|
||||
Set-GPOZaurrOwner [-GPOName <String>] [-GPOGuid <String>] [-Forest <String>] [-ExcludeDomains <String[]>]
|
||||
[-IncludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>] [-Principal <String>] [-SkipSysvol]
|
||||
[-LimitProcessing <Int32>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
[-LimitProcessing <Int32>] [-ApprovedOwner <String[]>] [-Action <String>] [-Force] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
@@ -43,6 +44,7 @@ Set-GPOZaurrOwner -Type All -Verbose -WhatIf -LimitProcessing 2
|
||||
### -Type
|
||||
Unknown - finds unknown Owners and sets them to Administrative (Domain Admins) or chosen principal
|
||||
NotMatching - find administrative groups only and if sysvol and gpo doesn't match - replace with chosen principal or Domain Admins if not specified
|
||||
Inconsistent - same as not NotMatching
|
||||
NotAdministrative - combination of Unknown/NotMatching and NotAdministrative - replace with chosen principal or Domain Admins if not specified
|
||||
All - if Owner is known it checks if it's Administrative, if it sn't it fixes that.
|
||||
If owner is unknown it fixes it
|
||||
@@ -198,8 +200,38 @@ Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ApprovedOwner
|
||||
{{ Fill ApprovedOwner Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Exclusion, Exclusions
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Action
|
||||
{{ Fill Action Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Force
|
||||
{{ Fill Force Description }}
|
||||
Pushes new owner regardless if it's already set or not
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
|
||||
@@ -13,8 +13,14 @@ Allows to exclude Group Policy from being affected by fixes
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Name (Default)
|
||||
```
|
||||
Skip-GroupPolicy [[-Name] <String>] [[-DomaiName] <String>] [<CommonParameters>]
|
||||
Skip-GroupPolicy [-Name <String>] [-DomaiName <String>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### Guid
|
||||
```
|
||||
Skip-GroupPolicy [-GUID <String>] [-DomaiName <String>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
@@ -50,11 +56,26 @@ Define Group Policy Name to skip
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Parameter Sets: Name
|
||||
Aliases: GpoName, DisplayName
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GUID
|
||||
{{ Fill GUID Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Guid
|
||||
Aliases: ID
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
@@ -70,7 +91,7 @@ Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# Remove GPOS
|
||||
Remove-GPOZaurr -Type Empty, Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -BackupDated -LimitProcessing 2 -Verbose -WhatIf
|
||||
# Remove GPOS, but don't touch 2 defined exclusions
|
||||
$ExcludeGroupPolicies = {
|
||||
'TEST | Drive Mapping 1',
|
||||
'TEST | Drive Mapping 2'
|
||||
}
|
||||
Remove-GPOZaurr -Type Empty -BackupPath "$Env:UserProfile\Desktop\GPO" -BackupDated -LimitProcessing 3 -Verbose -WhatIf -ExcludeGroupPolicies $ExcludeGroupPolicies
|
||||
|
||||
# Remove GPOS, but don't touch 2 defined exclusions
|
||||
Remove-GPOZaurr -Type Empty, Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -BackupDated -LimitProcessing 2 -Verbose -WhatIf {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
#Clear-Host
|
||||
Remove-GPOZaurrPermission -Verbose -Type Unknown -LimitProcessing 1 #-WhatIf
|
||||
Remove-GPOZaurrPermission -Verbose -Type Unknown -LimitProcessing 5 -GPOName 'CA TEST'
|
||||
@@ -5,7 +5,7 @@
|
||||
# regardless if current user is still Domain Admin or not
|
||||
|
||||
$GPOs = Get-GPOZaurrOwner -IncludeSysvol
|
||||
$GPOs | Format-Table DisplayName, Owner, OwnerSID, OwnerType, SysvolOwner, SysvolSID, SysvolType
|
||||
$GPOs | Format-Table DisplayName, Status, Owner, OwnerSID, OwnerType, SysvolOwner, SysvolSID, SysvolType
|
||||
|
||||
Set-GPOZaurrOwner -Type Unknown -Verbose -WhatIf #-LimitProcessing 2
|
||||
Set-GPOZaurrOwner -Type All -Verbose -LimitProcessing 2 -WhatIf -IncludeDomains 'ad.evotec.pl'
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$GPOs = Get-GPOZaurrOwner -IncludeSysvol -Verbose
|
||||
$GPOs | Format-Table DisplayName, Status, Owner, OwnerSID, OwnerType, SysvolOwner, SysvolSID, SysvolType
|
||||
|
||||
#Set-GPOZaurrOwner -Type All -Verbose -LimitProcessing 2 -WhatIf -IncludeDomains 'ad.evotec.xyz'
|
||||
|
||||
Set-GPOZaurrOwner -Type All -Verbose -LimitProcessing 2 -WhatIf -IncludeDomains 'ad.evotec.xyz' -ApprovedOwner @(
|
||||
'EVOTEC\przemyslaw.klys'
|
||||
)
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
$T = Get-GPOZaurrOwner -Verbose -IncludeSysvol
|
||||
$T | Format-Table *
|
||||
#$T | Out-HtmlView -ScrollX
|
||||
|
||||
$T = Get-GPOZaurrOwner -Verbose -IncludeSysvol -ApprovedOwner @('EVOTEC\Domain Admins')
|
||||
$T | Format-Table *
|
||||
|
||||
$T = Get-GPOZaurrOwner -Verbose -IncludeSysvol -GPOName 'Default Domain Policy'
|
||||
$T | Format-Table *
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurrGPOOwners.html -Type GPOOwners -Online -Exclusions @(
|
||||
'EVOTEC\Domain Admins'
|
||||
'EVOTEC\przemyslaw.klys'
|
||||
)
|
||||
@@ -7,4 +7,7 @@ Add-GPOZaurrPermission -GPOName 'New Group Policy Object' -Type AuthenticatedUse
|
||||
Add-GPOZaurrPermission -Type AuthenticatedUsers -PermissionType GpoRead -All -WhatIf -Verbose
|
||||
|
||||
# Add Domain Admins/Enterprise Admins to all that need it
|
||||
Add-GPOZaurrPermission -Type Administrative -PermissionType GpoEditDeleteModifySecurity -All -WhatIf -Verbose
|
||||
Add-GPOZaurrPermission -Type Administrative -PermissionType GpoEditDeleteModifySecurity -All -WhatIf -Verbose
|
||||
|
||||
# Add ranom name to all that need it
|
||||
Add-GPOZaurrPermission -All -Principal SVC_AGPM -PrincipalType Name -PermissionType GpoEditDeleteModifySecurity -Verbose -LimitProcessing 2 -WhatIf
|
||||
@@ -4,7 +4,7 @@
|
||||
Get-GPOZaurrBroken -Verbose | Format-Table # -IncludeDomains 'ad.evotec.pl' | Format-Table
|
||||
|
||||
# this allows you to process X amount of orphaned folders/files (good for testing)
|
||||
Remove-GPOZaurrBroken -Verbose -WhatIf -Type AD, SYSVOL -LimitProcessing 1 #-IncludeDomains 'ad.evotec.pl' #-LimitProcessing 2
|
||||
Remove-GPOZaurrBroken -Verbose -WhatIf -Type AD -LimitProcessing 10 #-IncludeDomains 'ad.evotec.pl' #-LimitProcessing 2
|
||||
|
||||
# this runs for whole SYSVOL and checks things against GPOS
|
||||
Remove-GPOZaurrBroken -Verbose -IncludeDomains 'ad.evotec.xyz' -BackupPath $Env:UserProfile\Desktop\MyBackup1 -WhatIf -Type AD, SYSVOL
|
||||
@@ -8,7 +8,7 @@ Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
#Get-GPOZaurrLinkSummary -Report 'LinksSummary' -UnlimitedProperties | Format-Table *
|
||||
|
||||
$Report = Get-GPOZaurrLinkSummary #-UnlimitedProperties
|
||||
$Report | Format-Table
|
||||
$Report.MultipleLinks | Format-Table *
|
||||
#$Report | Format-Table
|
||||
#$Report.MultipleLinks | Format-Table *
|
||||
$Report.OneLink | Format-Table *
|
||||
$Report.LinksSummary | Format-Table *
|
||||
#$Report.LinksSummary | Format-Table *
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# This gets the same thing as earlier examples
|
||||
# with a difference where one entry per gpo and all settings for that GPO is stored under settings property.
|
||||
$Output = Invoke-GPOZaurrContent -SingleObject -Verbose
|
||||
$Output = Invoke-GPOZaurrContent -Verbose #-SingleObject -Verbose
|
||||
$Output | Format-Table
|
||||
$Output.Reports.RegistrySettings | Format-Table *
|
||||
$Output.Reports.RegistrySettings[0].Settings | Format-Table *
|
||||
@@ -1,4 +1,4 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$Output = Invoke-GPOZaurrContent -Verbose -OutputType HTML, Object -Open -Type LocalGroups
|
||||
$Output = Invoke-GPOZaurrContent -SingleObject -Verbose -OutputType HTML, Object -Open -GPOPath "C:\Users\przemyslaw.klys\OneDrive - Evotec\Desktop\Test"
|
||||
$Output | Format-Table
|
||||
@@ -6,5 +6,10 @@
|
||||
|
||||
# Get same output DN, CanonicalName, BlockInheritance (True/False) + Users/Computers + UsersCount/ComputerCount for those with Blocked Inhertiance
|
||||
# This is so you can have a list what machines are affected
|
||||
$Objects = Get-GPOZaurrInheritance -IncludeBlockedObjects -OnlyBlockedInheritance
|
||||
$ExcludedOU = @(
|
||||
# Works on OU/
|
||||
'ad.evotec.xyz/ITR02/Test'
|
||||
)
|
||||
|
||||
$Objects = Get-GPOZaurrInheritance -IncludeBlockedObjects -IncludeExcludedObjects -OnlyBlockedInheritance -Exclusions $ExcludedOU -IncludeGroupPoliciesForBlockedObjects
|
||||
$Objects | Format-Table
|
||||
@@ -1,4 +1,4 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$FilesAll = Get-GPOZaurrNetLogon -SkipOwner -IncludeDomains 'ad.evotec.pl' #-OwnerOnly
|
||||
$FilesAll = Get-GPOZaurrNetLogon -IncludeDomains 'ad.evotec.xyz' -Verbose -OwnerOnly
|
||||
$FilesAll | Format-Table -a *
|
||||
@@ -1,4 +1,19 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
#$Output = Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -PassThru -Type GPOConsistency, GPOList, GPODuplicates, GPOOrphans, GPOOwners, NetLogonOwners, GPOPermissionsRead, GPOPermissionsAdministrative,GPOPermissionsUnknown
|
||||
Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Type GPOBrokenLink
|
||||
Invoke-GPOZaurr -Type GPOOrganizationalUnit -Online -FilePath $PSScriptRoot\Reports\GPOZaurr.html
|
||||
|
||||
# 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'
|
||||
)
|
||||
|
||||
# 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
|
||||
|
||||
Invoke-GPOZaurr -Type GPOOwners -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'
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Type GPOConsistency, GPOList, GPODuplicates, GPOOrphans, GPOOwners, NetLogonOwners, GPOPermissionsRead, GPOPermissionsAdministrative, GPOPermissionsUnknown, GPOPermissions
|
||||
Invoke-GPOZaurr -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Type GPOConsistency, GPOList, GPODuplicates, GPOBroken, GPOOwners, NetLogonOwners, GPOPermissionsRead, GPOPermissionsAdministrative, GPOPermissionsUnknown, GPOPermissions
|
||||
@@ -5,7 +5,7 @@ $Types = @(
|
||||
@{ Name = 'GPOConsistency'; Path = "$PSScriptRoot\Reports\GPOConsistency.html" }
|
||||
@{ Name = 'GPODuplicates'; Path = "$PSScriptRoot\Reports\GPODuplicates.html" }
|
||||
@{ Name = 'GPOList'; Path = "$PSScriptRoot\Reports\GPOList.html" }
|
||||
@{ Name = 'GPOBroken'; Path = "$PSScriptRoot\Reports\GPOOrphans.html" }
|
||||
@{ Name = 'GPOBroken'; Path = "$PSScriptRoot\Reports\GPOBroken.html" }
|
||||
@{ Name = 'GPOPassword'; Path = "$PSScriptRoot\Reports\GPOPassword.html" }
|
||||
@{ Name = 'NetLogonPermissions'; Path = "$PSScriptRoot\Reports\NetLogonPermissions.html" }
|
||||
)
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$GPOS = Get-GPOZaurr -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\Empty' -ExcludeGroupPolicies @(
|
||||
$GPOS = Get-GPOZaurr -ExcludeGroupPolicies {
|
||||
Skip-GroupPolicy -Name 'de14_usr_std'
|
||||
Skip-GroupPolicy -Name 'de14_usr_std' -DomaiName 'ad.evotec.xyz'
|
||||
)
|
||||
$GPOS | Format-Table -AutoSize *
|
||||
Skip-GroupPolicy -Name 'All | Trusted Websites' #-DomaiName 'ad.evotec.xyz'
|
||||
'{D39BF08A-87BF-4662-BFA0-E56240EBD5A2}'
|
||||
'COMPUTERS | Enable Sets'
|
||||
}
|
||||
$GPOS | Format-Table -AutoSize *
|
||||
|
||||
$Output = Invoke-GPOZaurr -Type GPOList -Exclusions {
|
||||
Skip-GroupPolicy -Name 'All | Trusted Websites' -DomaiName 'ad.evotec.xyz'
|
||||
'{D39BF08A-87BF-4662-BFA0-E56240EBD5A2}'
|
||||
"104da6a7-c7d2-48da-b24b-8fa584f7b0b6"
|
||||
"{087b4f69-c541-429f-8dfd-0eb3ed133910}"
|
||||
'COMPUTERS | Enable Sets'
|
||||
'24194523-bb82-439c-a533-abf4f30fa2c4'
|
||||
'{31b2f340-016d-11d2-945f-00c04fb984f9 } '
|
||||
} -PassThru
|
||||
|
||||
$Output.GPOList
|
||||
@@ -0,0 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Invoke-GPOZaurr -Online -Verbose -FilePath $PSScriptRoot\Reports\GPOZaurr.html -SplitReports
|
||||
@@ -1,5 +1,5 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Repair-GPOZaurrBrokenLink -Verbose -LimitProcessing 1 -WhatIf
|
||||
Repair-GPOZaurrBrokenLink -Verbose -LimitProcessing 1 #-WhatIf
|
||||
|
||||
#Repair-GPOZaurrBrokenLink -Verbose -IncludeDomains ad.evotec.pl -LimitProcessing 30 #-WhatIf
|
||||
@@ -0,0 +1,10 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Remove-GPOZaurrLinkEmptyOU -Verbose -LimitProcessing 3 -WhatIf
|
||||
|
||||
$Exclude = @(
|
||||
"OU=Groups,OU=Production,DC=ad,DC=evotec,DC=pl"
|
||||
"OU=Test \, OU,OU=ITR02,DC=ad,DC=evotec,DC=xyz"
|
||||
)
|
||||
|
||||
Remove-GPOZaurrLinkEmptyOU -Verbose -LimitProcessing 3 -WhatIf -ExcludeOrganizationalUnit $Exclude
|
||||
@@ -0,0 +1,17 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$OUs = Get-GPOZaurrOrganizationalUnit
|
||||
$Ous | Format-Table
|
||||
|
||||
Get-GPOZaurrOrganizationalUnit -Verbose -Option Unlink -Exclusions @(
|
||||
'OU=Groups,OU=Production,DC=ad,DC=evotec,DC=pl'
|
||||
) | Format-Table
|
||||
|
||||
Get-GPOZaurrOrganizationalUnit -Verbose -ExcludeOrganizationalUnit @(
|
||||
'*,OU=Production,DC=ad,DC=evotec,DC=pl'
|
||||
) | Format-Table
|
||||
|
||||
Invoke-GPOZaurr -Type GPOOrganizationalUnit -Online -FilePath $PSScriptRoot\Reports\GPOZaurrOU.html -Exclusions @(
|
||||
'*OU=Production,DC=ad,DC=evotec,DC=pl'
|
||||
'*OU=Accounts,OU=Administration,DC=ad,DC=evotec,DC=xyz'
|
||||
)
|
||||
@@ -0,0 +1,4 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrUpdates -DateRange Last14Days -DateProperty WhenCreated, WhenChanged -Verbose -IncludeDomains 'ad.evotec.pl' | Format-List
|
||||
Get-GPOZaurrUpdates -DateRange Last14Days -DateProperty WhenCreated -Verbose | Format-Table
|
||||
@@ -0,0 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Export-GPOZaurrContent -FolderOutput $PSScriptRoot\ExportedXML -ReportType XML
|
||||
@@ -0,0 +1,4 @@
|
||||
Import-Module .\GPoZaurr.psd1 -Force
|
||||
|
||||
$Data = Invoke-GPOZaurr -Online -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Type GPORedirect -PassThru
|
||||
$Data.GPORedirect
|
||||
@@ -0,0 +1,14 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$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
|
||||
|
||||
#>
|
||||
@@ -0,0 +1,10 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# search by guid or name for specific GPOs
|
||||
#Get-GPOZaurrMissingFiles -GPOGUID '{2F326111-C21B-4892-B7BC-9BDCB201FFCC}' | Format-Table
|
||||
|
||||
# search for all GPOs with missing files
|
||||
#Get-GPOZaurrMissingFiles -BrokenOnly | Format-Table
|
||||
|
||||
# search for all GPOs with missing files for everythin
|
||||
Invoke-GPOZaurr -Type GPOBrokenPartially #, GPOBroken, GPOBrokenLink
|
||||
+15
-11
@@ -4,31 +4,35 @@
|
||||
CmdletsToExport = @()
|
||||
CompanyName = 'Evotec'
|
||||
CompatiblePSEditions = @('Desktop')
|
||||
Copyright = '(c) 2011 - 2021 Przemyslaw Klys @ Evotec. All rights reserved.'
|
||||
Copyright = '(c) 2011 - 2024 Przemyslaw Klys @ Evotec. All rights reserved.'
|
||||
Description = 'Group Policy Eater is a PowerShell module that aims to gather information about Group Policies but also allows fixing issues that you may find in them.'
|
||||
FunctionsToExport = @('Add-GPOPermission', 'Add-GPOZaurrPermission', 'Backup-GPOZaurr', 'Clear-GPOZaurrSysvolDFSR', 'ConvertFrom-CSExtension', '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-GPOZaurrNetLogon', 'Get-GPOZaurrOwner', 'Get-GPOZaurrPassword', 'Get-GPOZaurrPermission', 'Get-GPOZaurrPermissionAnalysis', 'Get-GPOZaurrPermissionConsistency', 'Get-GPOZaurrPermissionIssue', 'Get-GPOZaurrPermissionRoot', 'Get-GPOZaurrPermissionSummary', 'Get-GPOZaurrSysvolDFSR', '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-GPOZaurrPermission', 'Remove-GPOZaurrWMI', 'Repair-GPOZaurrBrokenLink', 'Repair-GPOZaurrNetLogonOwner', 'Repair-GPOZaurrPermission', 'Repair-GPOZaurrPermissionConsistency', 'Restore-GPOZaurr', 'Save-GPOZaurrFiles', 'Set-GPOOwner', 'Set-GPOZaurrOwner', 'Set-GPOZaurrStatus', 'Skip-GroupPolicy')
|
||||
FunctionsToExport = @('Add-GPOPermission', 'Add-GPOZaurrPermission', 'Backup-GPOZaurr', 'Clear-GPOZaurrSysvolDFSR', 'ConvertFrom-CSExtension', 'Export-GPOZaurrContent', 'Find-CSExtension', 'Get-GPOZaurr', 'Get-GPOZaurrAD', 'Get-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 = '0.0.108'
|
||||
ModuleVersion = '1.1.0'
|
||||
PowerShellVersion = '5.1'
|
||||
PrivateData = @{
|
||||
PSData = @{
|
||||
Tags = @('Windows', 'ActiveDirectory', 'GPO', 'GroupPolicy')
|
||||
ProjectUri = 'https://github.com/EvotecIT/GPOZaurr'
|
||||
ExternalModuleDependencies = @('CimCmdlets', 'Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Utility', 'Microsoft.PowerShell.Security')
|
||||
ProjectUri = 'https://github.com/EvotecIT/GPOZaurr'
|
||||
Tags = @('Windows', 'ActiveDirectory', 'GPO', 'GroupPolicy')
|
||||
}
|
||||
}
|
||||
RequiredModules = @(@{
|
||||
ModuleVersion = '0.0.193'
|
||||
ModuleName = 'PSSharedGoods'
|
||||
Guid = '0b0ba5c5-ec85-4c2b-a718-874e55a8bc3f'
|
||||
ModuleName = 'PSWriteColor'
|
||||
ModuleVersion = '1.0.1'
|
||||
}, @{
|
||||
Guid = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe'
|
||||
ModuleName = 'PSSharedGoods'
|
||||
ModuleVersion = '0.0.276'
|
||||
}, @{
|
||||
ModuleVersion = '0.0.104'
|
||||
ModuleName = 'ADEssentials'
|
||||
Guid = '9fc9fd61-7f11-4f4b-a527-084086f1905f'
|
||||
ModuleName = 'ADEssentials'
|
||||
ModuleVersion = '0.0.185'
|
||||
}, @{
|
||||
ModuleVersion = '0.0.122'
|
||||
ModuleName = 'PSWriteHTML'
|
||||
Guid = 'a7bdf640-f5cb-4acf-9de0-365b322d245c'
|
||||
ModuleName = 'PSWriteHTML'
|
||||
ModuleVersion = '1.17.0'
|
||||
}, 'CimCmdlets', 'Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Utility', 'Microsoft.PowerShell.Security')
|
||||
RootModule = 'GPOZaurr.psm1'
|
||||
}
|
||||
+46
-6
@@ -2,13 +2,53 @@
|
||||
$Public = @( Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue -Recurse )
|
||||
$Private = @( Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue -Recurse )
|
||||
|
||||
#Dot source the files
|
||||
Foreach ($import in @($Public + $Private)) {
|
||||
Try {
|
||||
. $import.fullname
|
||||
} Catch {
|
||||
Write-Error -Message "Failed to import function $($import.fullname): $_"
|
||||
$AssemblyFolders = Get-ChildItem -Path $PSScriptRoot\Lib -Directory -ErrorAction SilentlyContinue
|
||||
if ($AssemblyFolders.BaseName -contains 'Standard') {
|
||||
$Assembly = @( Get-ChildItem -Path $PSScriptRoot\Lib\Standard\*.dll -ErrorAction SilentlyContinue )
|
||||
} else {
|
||||
if ($PSEdition -eq 'Core') {
|
||||
$Assembly = @( Get-ChildItem -Path $PSScriptRoot\Lib\Core\*.dll -ErrorAction SilentlyContinue )
|
||||
} else {
|
||||
$Assembly = @( Get-ChildItem -Path $PSScriptRoot\Lib\Default\*.dll -ErrorAction SilentlyContinue )
|
||||
}
|
||||
}
|
||||
$FoundErrors = @(
|
||||
Foreach ($Import in @($Assembly)) {
|
||||
try {
|
||||
Add-Type -Path $Import.Fullname -ErrorAction Stop
|
||||
} catch [System.Reflection.ReflectionTypeLoadException] {
|
||||
Write-Warning "Processing $($Import.Name) Exception: $($_.Exception.Message)"
|
||||
$LoaderExceptions = $($_.Exception.LoaderExceptions) | Sort-Object -Unique
|
||||
foreach ($E in $LoaderExceptions) {
|
||||
Write-Warning "Processing $($Import.Name) LoaderExceptions: $($E.Message)"
|
||||
}
|
||||
$true
|
||||
#Write-Error -Message "StackTrace: $($_.Exception.StackTrace)"
|
||||
} catch {
|
||||
Write-Warning "Processing $($Import.Name) Exception: $($_.Exception.Message)"
|
||||
$LoaderExceptions = $($_.Exception.LoaderExceptions) | Sort-Object -Unique
|
||||
foreach ($E in $LoaderExceptions) {
|
||||
Write-Warning "Processing $($Import.Name) LoaderExceptions: $($E.Message)"
|
||||
}
|
||||
$true
|
||||
#Write-Error -Message "StackTrace: $($_.Exception.StackTrace)"
|
||||
}
|
||||
}
|
||||
#Dot source the files
|
||||
Foreach ($Import in @($Private + $Public)) {
|
||||
Try {
|
||||
. $Import.Fullname
|
||||
} Catch {
|
||||
Write-Error -Message "Failed to import functions from $($import.Fullname): $_"
|
||||
$true
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
if ($FoundErrors.Count -gt 0) {
|
||||
$ModuleName = (Get-ChildItem $PSScriptRoot\*.psd1).BaseName
|
||||
Write-Warning "Importing module $ModuleName failed. Fix errors before continuing."
|
||||
break
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function '*' -Alias '*'
|
||||
@@ -0,0 +1,101 @@
|
||||
function ConvertTo-XMLCertificates {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[string[]] $Category,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
$SkipNames = ('Name', 'LocalName', 'NamespaceURI', 'Prefix', 'NodeType', 'ParentNode', 'OwnerDocument', 'IsEmpty', 'Attributes', 'HasAttributes', 'SchemaInfo', 'InnerXml', 'InnerText', 'NextSibling', 'PreviousSibling', 'ChildNodes', 'FirstChild', 'LastChild', 'HasChildNodes', 'IsReadOnly', 'OuterXml', 'BaseURI', 'PreviousText')
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
[Array] $CreateGPO['Settings'] = foreach ($Setting in $GPO.DataSet) {
|
||||
$SettingName = $Setting.Name -split ":"
|
||||
$MySettings = [ordered] @{
|
||||
CreatedTime = $GPO.CreatedTime # : 06.06.2020 18:03:36
|
||||
ModifiedTime = $GPO.ModifiedTime # : 17.06.2020 16:08:10
|
||||
ReadTime = $GPO.ReadTime # : 13.08.2020 10:15:37
|
||||
SecurityDescriptor = $GPO.SecurityDescriptor # : SecurityDescriptor
|
||||
FilterDataAvailable = $GPO.FilterDataAvailable # : True
|
||||
}
|
||||
$Name = $SettingName[1]
|
||||
#$Name = Format-ToTitleCase -Text $Setting.Name -RemoveWhiteSpace -RemoveChar ',', '-', "'", '\(', '\)', ':'
|
||||
$MySettings['Name'] = $Name # $Setting.Name
|
||||
|
||||
ConvertTo-XMLNested -CreateGPO $MySettings -Setting $Setting -SkipNames $SkipNames #-Name $Name
|
||||
|
||||
if ($MySettings.Data) {
|
||||
$bytes = $MySettings.Data -replace '\r?\n' -split '(?<=\G.{2})' -ne '' -replace '^', '0x' -as [byte[]]
|
||||
$CertificateData = [System.Security.Cryptography.X509Certificates.X509Certificate2]::new($bytes)
|
||||
|
||||
$MySettings['NotBefore'] = $CertificateData.NotBefore
|
||||
$MySettings['NotAfter'] = $CertificateData.NotAfter
|
||||
$MySettings['HasPrivateKey'] = $CertificateData.HasPrivateKey
|
||||
$MySettings['Thumbprint'] = $CertificateData.Thumbprint
|
||||
$MySettings['SerialNumber'] = $CertificateData.SerialNumber
|
||||
$MySettings['Version'] = $CertificateData.Version
|
||||
$MySettings['Handle'] = $CertificateData.Handle
|
||||
$MySettings['SignatureAlgorithm'] = $CertificateData.SignatureAlgorithm.Value
|
||||
$MySettings['SignatureAlgorithmName'] = $CertificateData.SignatureAlgorithm.FriendlyName
|
||||
$MySettings['KeyUsages'] = $CertificateData.Extensions.KeyUsages
|
||||
$MySettings.Remove('Data')
|
||||
}
|
||||
|
||||
[PSCustomObject] $MySettings
|
||||
}
|
||||
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Setting in $GPO.DataSet) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
}
|
||||
$SettingName = $Setting.Name -split ":"
|
||||
$CreateGPO['CreatedTime'] = $GPO.CreatedTime # : 06.06.2020 18:03:36
|
||||
$CreateGPO['ModifiedTime'] = $GPO.ModifiedTime # : 17.06.2020 16:08:10
|
||||
$CreateGPO['ReadTime'] = $GPO.ReadTime # : 13.08.2020 10:15:37
|
||||
$CreateGPO['SecurityDescriptor'] = $GPO.SecurityDescriptor # : SecurityDescriptor
|
||||
$CreateGPO['FilterDataAvailable'] = $GPO.FilterDataAvailable # : True
|
||||
|
||||
$Name = $SettingName[1]
|
||||
$CreateGPO['Name'] = $Name # $Setting.Name
|
||||
|
||||
ConvertTo-XMLNested -CreateGPO $CreateGPO -Setting $Setting -SkipNames $SkipNames #-Name $Name
|
||||
|
||||
if ($CreateGPO.Data) {
|
||||
$bytes = $CreateGPO.Data -replace '\r?\n' -split '(?<=\G.{2})' -ne '' -replace '^', '0x' -as [byte[]]
|
||||
$CertificateData = [System.Security.Cryptography.X509Certificates.X509Certificate2]::new($bytes)
|
||||
|
||||
$CreateGPO['NotBefore'] = $CertificateData.NotBefore
|
||||
$CreateGPO['NotAfter'] = $CertificateData.NotAfter
|
||||
$CreateGPO['HasPrivateKey'] = $CertificateData.HasPrivateKey
|
||||
$CreateGPO['Thumbprint'] = $CertificateData.Thumbprint
|
||||
$CreateGPO['SerialNumber'] = $CertificateData.SerialNumber
|
||||
$CreateGPO['Version'] = $CertificateData.Version
|
||||
$CreateGPO['Handle'] = $CertificateData.Handle
|
||||
$CreateGPO['SignatureAlgorithm'] = $CertificateData.SignatureAlgorithm.Value
|
||||
$CreateGPO['SignatureAlgorithmName'] = $CertificateData.SignatureAlgorithm.FriendlyName
|
||||
$CreateGPO['KeyUsages'] = $CertificateData.Extensions.KeyUsages
|
||||
$CreateGPO.Remove('Data')
|
||||
}
|
||||
$CreateGPO['Filters'] = $Setting.Filters
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
function ConvertTo-XMLFolderRedirection {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
# Redirection types a stored as GUID in GPOs. This hash is used to translate into readable text.
|
||||
$FolderID = @{
|
||||
"{1777F761-68AD-4D8A-87BD-30B759FA33DD}" = "Favorites"
|
||||
"{FDD39AD0-238F-46AF-ADB4-6C85480369C7}" = "Documents"
|
||||
"{33E28130-4E1E-4676-835A-98395C3BC3BB}" = "Pictures"
|
||||
"{4BD8D571-6D19-48D3-BE97-422220080E43}" = "Music"
|
||||
"{18989B1D-99B5-455B-841C-AB7C74E4DDFC}" = "Videos"
|
||||
"{3EB685DB-65F9-4CF6-A03A-E3EF65729F3D}" = "AppDataRoaming"
|
||||
"{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}" = "Desktop"
|
||||
"{625B53C3-AB48-4EC1-BA1F-A1EF4146FC19}" = "StartMenu"
|
||||
"{374DE290-123F-4565-9164-39C4925E467B}" = "Downloads"
|
||||
"{4C5C32FF-BB9D-43B0-B5B4-2D72E54EAAA4}" = "Saved Games"
|
||||
"{56784854-C6CB-462B-8169-88E350ACB882}" = "Contacts"
|
||||
"{7D1D3A04-DEBB-4115-95CF-2F29DA2920DA}" = "Searches"
|
||||
"{BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968}" = "Links"
|
||||
}
|
||||
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 ($Folder in $GPO.DataSet) {
|
||||
foreach ($Location in $Folder.Location) {
|
||||
[PSCustomObject] @{
|
||||
ID = $Folder.ID
|
||||
FolderType = $FolderID[$Folder.Id]
|
||||
DestinationPath = $Location.DestinationPath
|
||||
SecuritySID = $Location.SecurityGroup.SID.'#text'
|
||||
SecurityName = $Location.SecurityGroup.Name.'#text'
|
||||
GrantExclusiveRights = if ($Folder.GrantExclusiveRights -eq 'true') { $true } else { $false }
|
||||
MoveContents = if ($Folder.MoveContents -eq 'true') { $true } else { $false }
|
||||
FollowParent = if ($Folder.FollowParent -eq 'true') { $true } else { $false }
|
||||
ApplyToDownLevel = if ($Folder.ApplyToDownLevel -eq 'true') { $true } else { $false }
|
||||
DoNotCare = if ($Folder.DoNotCare -eq 'true') { $true } else { $false }
|
||||
RedirectToLocal = if ($Folder.RedirectToLocal -eq 'true') { $true } else { $false }
|
||||
PolicyRemovalBehavior = $Folder.PolicyRemovalBehavior # : LeaveContents
|
||||
ConfigurationControl = if ($Folder.ConfigurationControl -eq 'GP') { 'Group Policy' } else { $Folder.ConfigurationControl } # : GP
|
||||
PrimaryComputerEvaluation = $Folder.PrimaryComputerEvaluation # : PrimaryComputerPolicyDisabled
|
||||
}
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Folder in $GPO.DataSet) {
|
||||
foreach ($Location in $Folder.Location) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
Id = $Folder.Id
|
||||
FolderType = $FolderID[$Folder.Id]
|
||||
DestinationPath = $Location.DestinationPath
|
||||
SecuritySID = $Location.SecurityGroup.SID.'#text'
|
||||
SecurityName = $Location.SecurityGroup.Name.'#text'
|
||||
GrantExclusiveRights = if ($Folder.GrantExclusiveRights -eq 'true') { $true } else { $false }
|
||||
MoveContents = if ($Folder.MoveContents -eq 'true') { $true } else { $false }
|
||||
FollowParent = if ($Folder.FollowParent -eq 'true') { $true } else { $false }
|
||||
ApplyToDownLevel = if ($Folder.ApplyToDownLevel -eq 'true') { $true } else { $false }
|
||||
DoNotCare = if ($Folder.DoNotCare -eq 'true') { $true } else { $false }
|
||||
RedirectToLocal = if ($Folder.RedirectToLocal -eq 'true') { $true } else { $false }
|
||||
PolicyRemovalBehavior = $Folder.PolicyRemovalBehavior # : LeaveContents
|
||||
ConfigurationControl = if ($Folder.ConfigurationControl -eq 'GP') { 'Group Policy' } else { $Folder.ConfigurationControl } # : GP
|
||||
PrimaryComputerEvaluation = $Folder.PrimaryComputerEvaluation # : PrimaryComputerPolicyDisabled
|
||||
Linked = $GPO.Linked
|
||||
LinksCount = $GPO.LinksCount
|
||||
Links = $GPO.Links
|
||||
}
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
function ConvertTo-XMLWindowsFirewall {
|
||||
[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 ($Policy in $GPO.DataSet) {
|
||||
[PSCustomObject] @{
|
||||
Name = $Policy.LocalName
|
||||
Version = $Policy.PolicyVersion.Value
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Policy in $GPO.DataSet) {
|
||||
[PSCustomObject]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
Name = $Policy.LocalName
|
||||
Version = $Policy.PolicyVersion.Value
|
||||
Linked = $GPO.Linked
|
||||
LinksCount = $GPO.LinksCount
|
||||
Links = $GPO.Links
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
function ConvertTo-XMLWindowsFirewallConnectionSecurityAuthentiation {
|
||||
[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 ($Connection in $GPO.DataSet) {
|
||||
[PSCustomObject] @{
|
||||
Name = $Connection.LocalName
|
||||
Version = $Connection.Version
|
||||
ConnectionGUID = $Connection.GUID
|
||||
Method = $Connection.AuthenticationSuites.Method #: MachineCert
|
||||
CAName = $Connection.AuthenticationSuites.CAName #: DC = xyz, DC = evotec, DC = ad, CN = ad-ADCS-CA
|
||||
CertAccountMapping = if ($Connection.AuthenticationSuites.CertAccountMapping -eq 'true') { $true } elseif ($Connection.AuthenticationSuites.CertAccountMapping -eq 'false') { $false } else { $Connection.AuthenticationSuites.CertAccountMapping }
|
||||
ExcludeCAName = if ($Connection.AuthenticationSuites.ExcludeCAName -eq 'true') { $true } elseif ($Connection.AuthenticationSuites.ExcludeCAName -eq 'false') { $false } else { $Connection.AuthenticationSuites.ExcludeCAName }
|
||||
HealthCert = if ($Connection.AuthenticationSuites.HealthCert -eq 'true') { $true } elseif ($Connection.AuthenticationSuites.HealthCert -eq 'false') { $false } else { $Connection.AuthenticationSuites.HealthCert }
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Connection in $GPO.DataSet) {
|
||||
[PSCustomObject]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
Name = $Connection.LocalName
|
||||
Version = $Connection.Version
|
||||
ConnectionGUID = $Connection.GUID
|
||||
Method = $Connection.AuthenticationSuites.Method #: MachineCert
|
||||
CAName = $Connection.AuthenticationSuites.CAName #: DC = xyz, DC = evotec, DC = ad, CN = ad-ADCS-CA
|
||||
CertAccountMapping = if ($Connection.AuthenticationSuites.CertAccountMapping -eq 'true') { $true } elseif ($Connection.AuthenticationSuites.CertAccountMapping -eq 'false') { $false } else { $Connection.AuthenticationSuites.CertAccountMapping }
|
||||
ExcludeCAName = if ($Connection.AuthenticationSuites.ExcludeCAName -eq 'true') { $true } elseif ($Connection.AuthenticationSuites.ExcludeCAName -eq 'false') { $false } else { $Connection.AuthenticationSuites.ExcludeCAName }
|
||||
HealthCert = if ($Connection.AuthenticationSuites.HealthCert -eq 'true') { $true } elseif ($Connection.AuthenticationSuites.HealthCert -eq 'false') { $false } else { $Connection.AuthenticationSuites.HealthCert }
|
||||
Linked = $GPO.Linked
|
||||
LinksCount = $GPO.LinksCount
|
||||
Links = $GPO.Links
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
function ConvertTo-XMLWindowsFirewallProfile {
|
||||
[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 ($Profile in $GPO.DataSet) {
|
||||
[PSCustomObject] @{
|
||||
Profile = $Profile.LocalName
|
||||
EnableFirewall = if ($Profile.EnableFirewall.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
AllowLocalIPsecPolicyMerge = if ($Profile.AllowLocalIPsecPolicyMerge.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
AllowLocalPolicyMerge = if ($Profile.AllowLocalPolicyMerge.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
DefaultInboundAction = if ($Profile.DefaultInboundAction.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
DefaultOutboundAction = if ($Profile.DefaultOutboundAction.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
DisableNotifications = if ($Profile.DisableNotifications.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
DisableUnicastResponsesToMulticastBroadcast = if ($Profile.DisableUnicastResponsesToMulticastBroadcast.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
DoNotAllowExceptions = if ($Profile.DoNotAllowExceptions.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
LogFilePath = if ($Profile.LogFilePath.Value) { $Profile.LogFilePath.Value } else { 'Not configured' }
|
||||
LogDroppedPackets = if ($Profile.LogDroppedPackets.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
LogFileSize = if ($Profile.LogFileSize.Value) { $Profile.LogFileSize.Value } else { 'Not configured' }
|
||||
LogSuccessfulConnections = if ($Profile.LogSuccessfulConnections.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Profile in $GPO.DataSet) {
|
||||
[PSCustomObject]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
Profile = $Profile.LocalName
|
||||
EnableFirewall = if ($Profile.EnableFirewall.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
AllowLocalIPsecPolicyMerge = if ($Profile.AllowLocalIPsecPolicyMerge.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
AllowLocalPolicyMerge = if ($Profile.AllowLocalPolicyMerge.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
DefaultInboundAction = if ($Profile.DefaultInboundAction.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
DefaultOutboundAction = if ($Profile.DefaultOutboundAction.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
DisableNotifications = if ($Profile.DisableNotifications.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
DisableUnicastResponsesToMulticastBroadcast = if ($Profile.DisableUnicastResponsesToMulticastBroadcast.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
DoNotAllowExceptions = if ($Profile.DoNotAllowExceptions.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
LogFilePath = if ($Profile.LogFilePath.Value) { $Profile.LogFilePath.Value } else { 'Not configured' }
|
||||
LogDroppedPackets = if ($Profile.LogDroppedPackets.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
LogFileSize = if ($Profile.LogFileSize.Value) { $Profile.LogFileSize.Value } else { 'Not configured' }
|
||||
LogSuccessfulConnections = if ($Profile.LogSuccessfulConnections.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
|
||||
Linked = $GPO.Linked
|
||||
LinksCount = $GPO.LinksCount
|
||||
Links = $GPO.Links
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
function ConvertTo-XMLWindowsFirewallRules {
|
||||
[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 ($Rule in $GPO.DataSet) {
|
||||
[PSCustomObject] @{
|
||||
Version = $Rule.Version
|
||||
Type = if ($Rule.Dir -eq 'In') { 'Inbound' } elseif ($Rule.Dir -eq 'Out') { 'Outbound' } else { $Rule.Dir }
|
||||
Name = $Rule.Name
|
||||
Action = $Rule.Action
|
||||
Enabled = if ($Rule.Active -eq 'true') { $true } else { $false }
|
||||
Profile = $Rule.Profile
|
||||
Svc = $Rule.Svc
|
||||
LocalAddressIPv4 = $Rule.LA4
|
||||
LocalAddressIPv6 = $Rule.LA6
|
||||
RemoteAddressIPV4 = $Rule.RA4
|
||||
RemoteAddressIPV6 = $Rule.RA6
|
||||
LocalPort = $Rule.LPort
|
||||
RemotePort = $Rule.RPort
|
||||
Description = $Rule.Desc
|
||||
EmbedCtxt = $Rule.EmbedCtxt
|
||||
Edge = $Rule.Edge
|
||||
IFType = $Rule.IFType
|
||||
Security = $Rule.Security
|
||||
App = $Rule.App
|
||||
Protocol = $Rule.Protocol
|
||||
RMAuth = $Rule.RMAuth
|
||||
RUAuth = $Rule.RUAuth
|
||||
ICMP4 = $Rule.ICMP4
|
||||
LocalName = $Rule.LocalName
|
||||
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Rule in $GPO.DataSet) {
|
||||
[PSCustomObject]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
Version = $Rule.Version
|
||||
Type = if ($Rule.Dir -eq 'In') { 'Inbound' } elseif ($Rule.Dir -eq 'Out') { 'Outbound' } else { $Rule.Dir }
|
||||
Name = $Rule.Name
|
||||
Action = $Rule.Action
|
||||
Enabled = if ($Rule.Active -eq 'true') { $true } else { $false }
|
||||
Profile = $Rule.Profile
|
||||
Svc = $Rule.Svc
|
||||
LocalAddressIPv4 = $Rule.LA4
|
||||
LocalAddressIPv6 = $Rule.LA6
|
||||
RemoteAddressIPV4 = $Rule.RA4
|
||||
RemoteAddressIPV6 = $Rule.RA6
|
||||
LocalPort = $Rule.LPort
|
||||
RemotePort = $Rule.RPort
|
||||
Description = $Rule.Desc
|
||||
EmbedCtxt = $Rule.EmbedCtxt
|
||||
Edge = $Rule.Edge
|
||||
IFType = $Rule.IFType
|
||||
Security = $Rule.Security
|
||||
App = $Rule.App
|
||||
Protocol = $Rule.Protocol
|
||||
RMAuth = $Rule.RMAuth
|
||||
RUAuth = $Rule.RUAuth
|
||||
ICMP4 = $Rule.ICMP4
|
||||
LocalName = $Rule.LocalName
|
||||
Linked = $GPO.Linked
|
||||
LinksCount = $GPO.LinksCount
|
||||
Links = $GPO.Links
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
<#
|
||||
Version : 2.30
|
||||
Action : Allow
|
||||
Name : @%SystemRoot%\system32\firewallapi.dll,-37303
|
||||
Dir : In
|
||||
App : %SystemRoot%\system32\svchost.exe
|
||||
Svc : dnscache
|
||||
Profile : Public
|
||||
RA4 : LocalSubnet
|
||||
RA6 : LocalSubnet
|
||||
LPort : 5353
|
||||
Protocol : 17
|
||||
Desc : @%SystemRoot%\system32\firewallapi.dll,-37304
|
||||
Active : true
|
||||
EmbedCtxt : @%SystemRoot%\system32\firewallapi.dll,-37302
|
||||
|
||||
|
||||
Version : 2.30
|
||||
Action : Allow
|
||||
Name : TEST APP
|
||||
Dir : In
|
||||
App : C:\Test\exe.exe
|
||||
Active : true
|
||||
|
||||
Version : 2.30
|
||||
Action : Block
|
||||
Name : Blo
|
||||
Dir : Out
|
||||
App : dfdff
|
||||
Active : true
|
||||
|
||||
Version : 2.30
|
||||
Action : Block
|
||||
Name : @FirewallAPI.dll,-36012
|
||||
Dir : Out
|
||||
App : %SystemRoot%\system32\svchost.exe
|
||||
Svc : Qwave
|
||||
Profile : {Private, Public}
|
||||
RPort : 2177
|
||||
Protocol : 17
|
||||
Desc : @FirewallAPI.dll,-36013
|
||||
Active : true
|
||||
EmbedCtxt : @FirewallAPI.dll,-36001
|
||||
#>
|
||||
@@ -0,0 +1,76 @@
|
||||
function ConvertTo-XMLWindowsFirewallSecurityRules {
|
||||
[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 ($Rule in $GPO.DataSet) {
|
||||
[PSCustomObject] @{
|
||||
Version = $Rule.Version
|
||||
Name = $Rule.Name
|
||||
Action = $Rule.Action
|
||||
Enabled = if ($Rule.Active -eq 'true') { $true } else { $false }
|
||||
Auth1Set = $Rule.Auth1Set
|
||||
Auth2Set = $Rule.Auth2Set
|
||||
Crypto2Set = $Rule.Crypto2Set
|
||||
Description = $Rule.Desc
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Rule in $GPO.DataSet) {
|
||||
[PSCustomObject]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
Version = $Rule.Version
|
||||
Name = $Rule.Name
|
||||
Action = $Rule.Action
|
||||
Enabled = if ($Rule.Active -eq 'true') { $true } else { $false }
|
||||
Auth1Set = $Rule.Auth1Set
|
||||
Auth2Set = $Rule.Auth2Set
|
||||
Crypto2Set = $Rule.Crypto2Set
|
||||
Description = $Rule.Desc
|
||||
Linked = $GPO.Linked
|
||||
LinksCount = $GPO.LinksCount
|
||||
Links = $GPO.Links
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
Version : 2.30
|
||||
Action : Boundary
|
||||
Name : TeST Aut
|
||||
Auth1Set : {E5A5D32A-4BCE-4e4d-B07F-4AB1BA7E5FE3}
|
||||
Auth2Set : {E5A5D32A-4BCE-4e4d-B07F-4AB1BA7E5FE4}
|
||||
Crypto2Set : {E5A5D32A-4BCE-4e4d-B07F-4AB1BA7E5FE2}
|
||||
Desc :
|
||||
Active : true
|
||||
|
||||
Version : 2.30
|
||||
Action : Boundary
|
||||
Name : CA TEST
|
||||
Auth1Set : {0E3A2DDC-F31B-42B5-BEAC-890752F9C0BB}
|
||||
Auth2Set : EmptySet
|
||||
Crypto2Set : {E5A5D32A-4BCE-4e4d-B07F-4AB1BA7E5FE2}
|
||||
Desc :
|
||||
Active : true
|
||||
#>
|
||||
@@ -0,0 +1,220 @@
|
||||
function Get-ADOrganizationalUnitObject {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets number of objects in a given OU/OUs with ability to find only those being affected by GPOs.
|
||||
|
||||
.DESCRIPTION
|
||||
Gets number of objects in a given OU/OUs with ability to find only those being affected by GPOs.
|
||||
|
||||
.PARAMETER OrganizationalUnit
|
||||
One or more organizational units to get the number of objects in.
|
||||
|
||||
.PARAMETER Extended
|
||||
Adds all objects affected for better understanding
|
||||
|
||||
.PARAMETER Summary
|
||||
Returns only summary for given OU/OUs
|
||||
|
||||
.PARAMETER IncludeAffectedOnly
|
||||
Ignores any object types that are not Users or Computers
|
||||
|
||||
.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 AsHashTable
|
||||
Returns results in form of hashtable
|
||||
|
||||
.PARAMETER ExtendedForestInformation
|
||||
Ability to provide Forest Information from another command to speed up processing
|
||||
|
||||
.EXAMPLE
|
||||
$OUs = @(
|
||||
'OU=SE,OU=ITR01,DC=ad,DC=evotec,DC=xyz'
|
||||
'OU=US,OU=ITR01,DC=ad,DC=evotec,DC=xyz'
|
||||
'OU=ITR01,DC=ad,DC=evotec,DC=xyz'
|
||||
'OU=Users,OU=User,OU=SE1,OU=SE,OU=ITR01,DC=ad,DC=evotec,DC=xyz'
|
||||
)
|
||||
|
||||
Get-ADOrganizationalUnitObject -OrganizationalUnit $OUs -IncludeAffectedOnly | Format-Table
|
||||
|
||||
.EXAMPLE
|
||||
$OUs = @(
|
||||
'OU=SE,OU=ITR01,DC=ad,DC=evotec,DC=xyz'
|
||||
'OU=US,OU=ITR01,DC=ad,DC=evotec,DC=xyz'
|
||||
'OU=ITR01,DC=ad,DC=evotec,DC=xyz'
|
||||
'OU=Users,OU=User,OU=SE1,OU=SE,OU=ITR01,DC=ad,DC=evotec,DC=xyz'
|
||||
)
|
||||
|
||||
Get-ADOrganizationalUnitObject -OrganizationalUnit $OUs | Format-Table
|
||||
|
||||
.EXAMPLE
|
||||
$OUs = @(
|
||||
#'OU=SE,OU=ITR01,DC=ad,DC=evotec,DC=xyz'
|
||||
#'OU=US,OU=ITR01,DC=ad,DC=evotec,DC=xyz'
|
||||
'OU=Users,OU=User,OU=SE1,OU=SE,OU=ITR01,DC=ad,DC=evotec,DC=xyz'
|
||||
'OU=ITR01,DC=ad,DC=evotec,DC=xyz'
|
||||
)
|
||||
|
||||
Get-ADOrganizationalUnitObject -OrganizationalUnit $OUs -Summary -IncludeAffectedOnly | Format-List
|
||||
|
||||
.NOTES
|
||||
General notes
|
||||
#>
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[parameter(Mandatory)][Array] $OrganizationalUnit,
|
||||
[switch] $Extended,
|
||||
[switch] $Summary,
|
||||
[switch] $IncludeAffectedOnly,
|
||||
|
||||
[alias('ForestName')][string] $Forest,
|
||||
[string[]] $ExcludeDomains,
|
||||
[alias('Domain', 'Domains')][string[]] $IncludeDomains,
|
||||
[switch] $AsHashTable,
|
||||
[System.Collections.IDictionary] $ExtendedForestInformation
|
||||
)
|
||||
|
||||
$CachedOu = [ordered] @{}
|
||||
$ListOU = @(
|
||||
foreach ($OU in $OrganizationalUnit) {
|
||||
if ($OU.DistinguishedName) {
|
||||
$OU.DistinguishedName
|
||||
} else {
|
||||
$OU
|
||||
}
|
||||
}
|
||||
)
|
||||
$ForestInformation = Get-WinADForestDetails -Extended -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation
|
||||
$OUCache = Get-GPOBlockedInheritance -AsHashTable -ExtendedForestInformation $ForestInformation
|
||||
|
||||
if ($Summary) {
|
||||
$SummaryData = [ordered] @{
|
||||
ObjectsClasses = [ordered] @{}
|
||||
ObjectsTotalCount = 0
|
||||
ObjectsBlockedInheritanceCount = 0
|
||||
ObjectsTotal = [ordered] @{}
|
||||
ObjectsBlockedInheritance = [ordered] @{}
|
||||
DistinguishedName = [System.Collections.Generic.List[string]]::new()
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($OU in $ListOU) {
|
||||
$Domain = ConvertFrom-DistinguishedName -ToDomainCN -DistinguishedName $OU
|
||||
$ObjectsInOu = Get-ADObject -LDAPFilter "(|(ObjectClass=user)(ObjectClass=contact)(ObjectClass=computer)(ObjectClass=group)(objectClass=inetOrgPerson)(ObjectClass=PrintQueue))" -SearchBase $OU -Server $ForestInformation['QueryServers'][$Domain]['hostname'][0]
|
||||
#Write-Verbose "Get-GPOZaurrOrganizationalUnit - Processing $($Domain) / $($TOPOU.DistinguishedName) [$CountTop/$($TopOrganizationalUnits.Count)], found $($ObjectsInOu.Count) objects to process."
|
||||
if (-not $CachedOu[$OU]) {
|
||||
$CachedOu[$OU] = [ordered] @{
|
||||
DistinguishedName = $OU
|
||||
Domain = $Domain
|
||||
'ObjectsClasses' = [ordered] @{} # only direct, indirect, but not with blocked inheritance
|
||||
'ObjectsDirectCount' = 0
|
||||
'ObjectsIndirectCount' = 0
|
||||
'ObjectsTotalCount' = 0
|
||||
'ObjectsTotalIncludingBlockedCount' = 0
|
||||
'ObjectsBlockedInheritanceCount' = 0
|
||||
}
|
||||
if ($Extended) {
|
||||
$CachedOu[$OU]['ObjectsDirect'] = [ordered] @{}
|
||||
$CachedOu[$OU]['ObjectsIndirect'] = [ordered] @{}
|
||||
$CachedOu[$OU]['ObjectsTotal'] = [ordered] @{}
|
||||
$CachedOu[$OU]['ObjectsTotalIncludingBlocked'] = [ordered] @{}
|
||||
$CachedOu[$OU]['ObjectsBlockedInheritance'] = [ordered] @{}
|
||||
}
|
||||
}
|
||||
foreach ($Object in $ObjectsInOu) {
|
||||
if ($IncludeAffectedOnly) {
|
||||
if ($Object.ObjectClass -notin 'User', 'computer') {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
$Place = ConvertFrom-DistinguishedName -ToOrganizationalUnit -DistinguishedName $Object.DistinguishedName
|
||||
if (-not $Place) {
|
||||
# Write-Verbose -Message "Get-OrganizationalUnitObject - Processing object in container/root $($Object.DistinguishedName)"
|
||||
}
|
||||
|
||||
if ($Place -and $OUCache[$Place]) {
|
||||
$BlockedInheritance = $OUCache[$Place].BlockedInheritance
|
||||
} else {
|
||||
$BlockedInheritance = $false
|
||||
}
|
||||
|
||||
if ($Summary) {
|
||||
$SummaryData['DistinguishedName'].Add($OU)
|
||||
$SummaryData['ObjectsClasses'][$Object.ObjectClass] = ''
|
||||
if (-not $Place -or $Place -eq $OU) {
|
||||
$SummaryData['ObjectsTotal'][$Object.DistinguishedName] = $Object
|
||||
} else {
|
||||
if ($BlockedInheritance) {
|
||||
$SummaryData['ObjectsBlockedInheritance'][$Object.DistinguishedName] = $Object
|
||||
} else {
|
||||
$SummaryData['ObjectsTotal'][$Object.DistinguishedName] = $Object
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# This is standard way of finding OU's
|
||||
if (-not $Place -or $Place -eq $OU) {
|
||||
$CachedOu[$OU]['ObjectsDirectCount']++
|
||||
$CachedOu[$OU]['ObjectsTotalCount']++
|
||||
# using hashtable to avoid duplicates
|
||||
$CachedOu[$OU]['ObjectsClasses'][$Object.ObjectClass] = ''
|
||||
# adding all objects to the list, excluding blocked inheritance
|
||||
if ($Extended) {
|
||||
$CachedOu[$OU]['ObjectsTotal'][$Object.DistinguishedName] = $Object
|
||||
$CachedOu[$OU]['ObjectsDirect'][$Object.DistinguishedName] = $Object
|
||||
}
|
||||
} else {
|
||||
if ($BlockedInheritance) {
|
||||
# We only check for blocked inheritance if the object is not in the same OU
|
||||
$CachedOu[$OU]['ObjectsBlockedInheritanceCount']++
|
||||
if ($Extended) {
|
||||
$CachedOu[$OU]['ObjectsBlockedInheritance'][$Object.DistinguishedName] = $Object
|
||||
}
|
||||
} else {
|
||||
$CachedOu[$OU]['ObjectsIndirectCount']++
|
||||
$CachedOu[$OU]['ObjectsTotalCount']++
|
||||
|
||||
# using hashtable to avoid duplicates
|
||||
$CachedOu[$OU]['ObjectsClasses'][$Object.ObjectClass] = ''
|
||||
# adding all objects to the list excluding blocked inheritance
|
||||
if ($Extended) {
|
||||
$CachedOu[$OU]['ObjectsTotal'][$Object.DistinguishedName] = $Object
|
||||
$CachedOu[$OU]['ObjectsIndirect'][$Object.DistinguishedName] = $Object
|
||||
}
|
||||
}
|
||||
}
|
||||
$CachedOu[$OU]['ObjectsTotalIncludingBlockedCount']++
|
||||
if ($Extended) {
|
||||
$CachedOu[$OU]['ObjectsTotalIncludingBlocked'][$Object.DistinguishedName] = $Object
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if ($Summary) {
|
||||
foreach ($ObjectDistinguishedName in [string[]] $SummaryData['ObjectsBlockedInheritance'].Keys) {
|
||||
if ($SummaryData['ObjectsTotal'][$ObjectDistinguishedName]) {
|
||||
$SummaryData['ObjectsBlockedInheritance'].Remove($ObjectDistinguishedName)
|
||||
}
|
||||
}
|
||||
$SummaryData['ObjectsTotalCount'] = $SummaryData['ObjectsTotal'].Count
|
||||
$SummaryData['ObjectsBlockedInheritanceCount'] = $SummaryData['ObjectsBlockedInheritance'].Count
|
||||
if (-not $Extended) {
|
||||
$SummaryData.Remove('ObjectsTotal')
|
||||
$SummaryData.Remove('ObjectsBlockedInheritance')
|
||||
}
|
||||
[PSCustomObject] $SummaryData
|
||||
} else {
|
||||
if ($AsHashTable) {
|
||||
$CachedOu
|
||||
} else {
|
||||
$CachedOu.Values | ForEach-Object { [PSCustomObject] $_ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
function Get-ChoosenDates {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[ValidateSet('Everything', 'PastHour', 'CurrentHour', 'PastDay', 'CurrentDay', 'PastMonth', 'CurrentMonth', 'PastQuarter', 'CurrentQuarter', 'Last14Days', 'Last21Days', 'Last30Days' , 'Last7Days', 'Last3Days', 'Last1Days')][string] $DateRange
|
||||
)
|
||||
# Report Per Hour
|
||||
if ($DateRange -eq 'PastHour') {
|
||||
$DatesPastHour = Find-DatesPastHour
|
||||
if ($DatesPastHour) {
|
||||
$DatesPastHour
|
||||
}
|
||||
}
|
||||
if ($DateRange -eq 'CurrentHour') {
|
||||
$DatesCurrentHour = Find-DatesCurrentHour
|
||||
if ($DatesCurrentHour) {
|
||||
$DatesCurrentHour
|
||||
}
|
||||
}
|
||||
# Report Per Day
|
||||
if ($DateRange -eq 'PastDay') {
|
||||
$DatesDayPrevious = Find-DatesDayPrevious
|
||||
if ($DatesDayPrevious) {
|
||||
$DatesDayPrevious
|
||||
}
|
||||
}
|
||||
if ($DateRange -eq 'CurrentDay') {
|
||||
$DatesDayToday = Find-DatesDayToday
|
||||
if ($DatesDayToday) {
|
||||
$DatesDayToday
|
||||
}
|
||||
}
|
||||
# Report Per Month
|
||||
if ($DateRange -eq 'PastMonth') {
|
||||
# Find-DatesMonthPast runs only on 1st of the month unless -Force is used
|
||||
$DatesMonthPrevious = Find-DatesMonthPast -Force $true
|
||||
if ($DatesMonthPrevious) {
|
||||
$DatesMonthPrevious
|
||||
}
|
||||
}
|
||||
if ($DateRange -eq 'CurrentMonth') {
|
||||
$DatesMonthCurrent = Find-DatesMonthCurrent
|
||||
if ($DatesMonthCurrent) {
|
||||
$DatesMonthCurrent
|
||||
}
|
||||
}
|
||||
# Report Per Quarter
|
||||
if ($DateRange -eq 'PastQuarter') {
|
||||
# Find-DatesMonthPast runs only on 1st of the quarter unless -Force is used
|
||||
$DatesQuarterLast = Find-DatesQuarterLast -Force $true
|
||||
if ($DatesQuarterLast) {
|
||||
$DatesQuarterLast
|
||||
}
|
||||
}
|
||||
if ($DateRange -eq 'CurrentQuarter') {
|
||||
$DatesQuarterCurrent = Find-DatesQuarterCurrent
|
||||
if ($DatesQuarterCurrent) {
|
||||
$DatesQuarterCurrent
|
||||
}
|
||||
}
|
||||
if ($DateRange -eq 'Everything') {
|
||||
$DatesEverything = @{
|
||||
DateFrom = Get-Date -Year 1900 -Month 1 -Day 1
|
||||
DateTo = Get-Date -Year 2300 -Month 1 -Day 1
|
||||
}
|
||||
$DatesEverything
|
||||
}
|
||||
if ($DateRange -eq 'Last1days') {
|
||||
$DatesCurrentDayMinusDaysX = Find-DatesCurrentDayMinuxDaysX -days 1
|
||||
if ($DatesCurrentDayMinusDaysX) {
|
||||
$DatesCurrentDayMinusDaysX
|
||||
}
|
||||
}
|
||||
if ($DateRange -eq 'Last3days') {
|
||||
$DatesCurrentDayMinusDaysX = Find-DatesCurrentDayMinuxDaysX -days 3
|
||||
if ($DatesCurrentDayMinusDaysX) {
|
||||
$DatesCurrentDayMinusDaysX
|
||||
}
|
||||
}
|
||||
if ($DateRange -eq 'Last7days') {
|
||||
$DatesCurrentDayMinusDaysX = Find-DatesCurrentDayMinuxDaysX -days 7
|
||||
if ($DatesCurrentDayMinusDaysX) {
|
||||
$DatesCurrentDayMinusDaysX
|
||||
}
|
||||
}
|
||||
if ($DateRange -eq 'Last14days') {
|
||||
$DatesCurrentDayMinusDaysX = Find-DatesCurrentDayMinuxDaysX -days 14
|
||||
if ($DatesCurrentDayMinusDaysX) {
|
||||
$DatesCurrentDayMinusDaysX
|
||||
}
|
||||
}
|
||||
if ($DateRange -eq 'Last21days') {
|
||||
$DatesCurrentDayMinusDaysX = Find-DatesCurrentDayMinuxDaysX -days 21
|
||||
if ($DatesCurrentDayMinusDaysX) {
|
||||
$DatesCurrentDayMinusDaysX
|
||||
}
|
||||
}
|
||||
if ($DateRange -eq 'Last30Days') {
|
||||
$DatesCurrentDayMinusDaysX = Find-DatesCurrentDayMinuxDaysX -days 30
|
||||
if ($DatesCurrentDayMinusDaysX) {
|
||||
$DatesCurrentDayMinusDaysX
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
function Get-GPOBlockedInheritance {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[string] $Filter = '*',
|
||||
|
||||
[alias('ForestName')][string] $Forest,
|
||||
[string[]] $ExcludeDomains,
|
||||
[alias('Domain', 'Domains')][string[]] $IncludeDomains,
|
||||
[switch] $AsHashTable,
|
||||
[System.Collections.IDictionary] $ExtendedForestInformation
|
||||
)
|
||||
$OUCache = [ordered] @{}
|
||||
|
||||
$ForestInformation = Get-WinADForestDetails -Extended -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation
|
||||
|
||||
foreach ($Domain in $ForestInformation.Domains) {
|
||||
$OrganizationalUnits = Get-ADOrganizationalUnit -Filter $Filter -Properties gpOptions, canonicalName -Server $ForestInformation['QueryServers'][$Domain]['HostName'][0] #-SearchScope Subtree
|
||||
foreach ($OU in $OrganizationalUnits) {
|
||||
$OUCache[$OU.DistinguishedName] = [PSCustomObject] @{
|
||||
DistinguishedName = $OU.DistinguishedName
|
||||
BlockedInheritance = if ($OU.gpOptions -eq 1) { $true } else { $false } # blocked inheritance
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($AsHashTable) {
|
||||
$OUCache
|
||||
} else {
|
||||
$OUCache.Values
|
||||
}
|
||||
}
|
||||
@@ -31,13 +31,13 @@ function Get-GPOZaurrLinkInheritance {
|
||||
Parameter description
|
||||
|
||||
.PARAMETER Forest
|
||||
Parameter description
|
||||
Target different Forest, by default current forest is used
|
||||
|
||||
.PARAMETER ExcludeDomains
|
||||
Parameter description
|
||||
Exclude domain from search, by default whole forest is scanned
|
||||
|
||||
.PARAMETER IncludeDomains
|
||||
Parameter description
|
||||
Include only specific domains, by default whole forest is scanned
|
||||
|
||||
.PARAMETER ExtendedForestInformation
|
||||
Parameter description
|
||||
@@ -123,9 +123,13 @@ function Get-GPOZaurrLinkInheritance {
|
||||
# While initially we used $ForestInformation.Domains but the thing is GPOs can be linked to other domains so we need to get them all so we can use cache of it later on even if we're processing just one domain
|
||||
# That's why we use $ForestInformation.Forest.Domains instead
|
||||
foreach ($Domain in $ForestInformation.Forest.Domains) {
|
||||
$QueryServer = $ForestInformation['QueryServers'][$Domain]['HostName'][0]
|
||||
Get-GPO -All -DomainName $Domain -Server $QueryServer | ForEach-Object {
|
||||
$GPOCache["$Domain$($_.ID.Guid)"] = $_
|
||||
if ($ForestInformation['QueryServers'][$Domain]) {
|
||||
$QueryServer = $ForestInformation['QueryServers'][$Domain]['HostName'][0]
|
||||
Get-GPO -All -DomainName $Domain -Server $QueryServer | ForEach-Object {
|
||||
$GPOCache["$Domain$($_.ID.Guid)"] = $_
|
||||
}
|
||||
} else {
|
||||
Write-Warning -Message "Get-GPOZaurrLinkInheritance - Couldn't get query server for $Domain. Skipped."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
function Get-WellKnownFolders {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets users and computers well known folders for a forest
|
||||
|
||||
.DESCRIPTION
|
||||
Gets users and computers well known folders for a forest
|
||||
|
||||
.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
|
||||
|
||||
.EXAMPLE
|
||||
Get-WellKnownFolders
|
||||
|
||||
.NOTES
|
||||
General notes
|
||||
#>
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[alias('ForestName')][string] $Forest,
|
||||
[string[]] $ExcludeDomains,
|
||||
[alias('Domain', 'Domains')][string[]] $IncludeDomains,
|
||||
[System.Collections.IDictionary] $ExtendedForestInformation
|
||||
)
|
||||
|
||||
$ForestInformation = Get-WinADForestDetails -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation -Extended
|
||||
foreach ($Domain in $ForestInformation.Domains) {
|
||||
$ForestInformation.DomainsExtended[$Domain].ComputersContainer
|
||||
$ForestInformation.DomainsExtended[$Domain].UsersContainer
|
||||
}
|
||||
}
|
||||
+89
-33
@@ -7,11 +7,16 @@
|
||||
[switch] $OwnerOnly,
|
||||
[System.Collections.IDictionary] $ADAdministrativeGroups,
|
||||
[string] $Splitter = [System.Environment]::NewLine,
|
||||
[switch] $ReturnObject,
|
||||
[System.Collections.IDictionary] $ExcludeGroupPolicies,
|
||||
[string[]] $Type,
|
||||
[System.Collections.IDictionary] $LinksSummaryCache
|
||||
)
|
||||
|
||||
$SysvolGpoPath = "\\$($GPO.DomainName)\SYSVOL\$($GPO.DomainName)\Policies\{$($GPO.ID)}"
|
||||
|
||||
$DisplayName = $XMLContent.GPO.Name
|
||||
$DomainName = $XMLContent.GPO.Identifier.Domain.'#text'
|
||||
|
||||
if ($LinksSummaryCache) {
|
||||
$SearchGUID = -join ($XMLContent.GPO.Identifier.Domain.'#text', $XMLContent.GPO.Identifier.Identifier.InnerText -replace '{' -replace '}')
|
||||
if ($LinksSummaryCache[$SearchGUID]) {
|
||||
@@ -73,7 +78,7 @@
|
||||
} elseif ($XMLContent.GPO.Computer.Enabled -eq 'True') {
|
||||
$ComputerEnabled = $true
|
||||
} else {
|
||||
Write-Warning "Get-XMLGPO - Computer enabled not set to true or false. Weird."
|
||||
Write-Warning "Get-XMLGPO - Computer enabled not set to true or false [$DisplayName/$DomainName]. Weird."
|
||||
$ComputerEnabled = $null
|
||||
}
|
||||
if ($XMLContent.GPO.User.Enabled -eq 'False') {
|
||||
@@ -81,7 +86,7 @@
|
||||
} elseif ($XMLContent.GPO.User.Enabled -eq 'True') {
|
||||
$UserEnabled = $true
|
||||
} else {
|
||||
Write-Warning "Get-XMLGPO - User enabled not set to true or false. Weird."
|
||||
Write-Warning "Get-XMLGPO - User enabled not set to true or false [$DisplayName/$DomainName] . Weird."
|
||||
$UserEnabled = $null
|
||||
}
|
||||
# Translate Enabled to same as GPO GUI
|
||||
@@ -100,8 +105,8 @@
|
||||
}
|
||||
|
||||
# This is kind of old way of doing things, but it's superseded by other way below
|
||||
$ComputerSettingsAvailable = if ($null -eq $XMLContent.GPO.Computer.ExtensionData) { $false } else { $true }
|
||||
$UserSettingsAvailable = if ($null -eq $XMLContent.GPO.User.ExtensionData) { $false } else { $true }
|
||||
[bool] $ComputerSettingsAvailable = if ($null -eq $XMLContent.GPO.Computer.ExtensionData) { $false } else { $true }
|
||||
[bool] $UserSettingsAvailable = if ($null -eq $XMLContent.GPO.User.ExtensionData) { $false } else { $true }
|
||||
|
||||
if ($ComputerSettingsAvailable -eq $false -and $UserSettingsAvailable -eq $false) {
|
||||
$NoSettings = $true
|
||||
@@ -112,35 +117,71 @@
|
||||
# $OutputUser = $XMLContent.GPO.User.ExtensionData.Extension | Where-Object { $_.PSObject.Properties.TypeNameOfValue -in 'System.Xml.XmlElement', 'System.Object[]' }
|
||||
# $OutputComputer = $XMLContent.GPO.Computer.ExtensionData.Extension | Where-Object { $_.PSObject.Properties.TypeNameOfValue -in 'System.Xml.XmlElement', 'System.Object[]' }
|
||||
|
||||
$OutputUser = foreach ($ExtensionType in $XMLContent.GPO.User.ExtensionData.Extension) {
|
||||
if ($ExtensionType) {
|
||||
$GPOSettingTypeSplit = ($ExtensionType.type -split ':')
|
||||
try {
|
||||
$KeysToLoop = $ExtensionType | Get-Member -MemberType Properties -ErrorAction Stop | Where-Object { $_.Name -notin 'type', $GPOSettingTypeSplit[0] -and $_.Name -notin @('Blocked') }
|
||||
} catch {
|
||||
Write-Warning "Get-XMLGPO - things went sideways $($_.Exception.Message)"
|
||||
continue
|
||||
}
|
||||
|
||||
# This is additional check we do for error check to prevent false-positives for EMPTY on non-english language
|
||||
$PreCheckOutputUser = $false
|
||||
$PreCheckOutputComputer = $false
|
||||
foreach ($Extension in $XMLContent.GPO.User.ExtensionData) {
|
||||
if ($Extension.Error) {
|
||||
$PreCheckOutputUser = $true
|
||||
}
|
||||
$KeysToLoop
|
||||
}
|
||||
$OutputComputer = foreach ($ExtensionType in $XMLContent.GPO.Computer.ExtensionData.Extension) {
|
||||
if ($ExtensionType) {
|
||||
$GPOSettingTypeSplit = ($ExtensionType.type -split ':')
|
||||
try {
|
||||
$KeysToLoop = $ExtensionType | Get-Member -MemberType Properties -ErrorAction Stop | Where-Object { $_.Name -notin 'type', $GPOSettingTypeSplit[0] -and $_.Name -notin @('Blocked') }
|
||||
} catch {
|
||||
Write-Warning "Get-XMLGPO - things went sideways $($_.Exception.Message)"
|
||||
continue
|
||||
}
|
||||
foreach ($Extension in $XMLContent.GPO.Computer.ExtensionData) {
|
||||
if ($Extension.Error) {
|
||||
$PreCheckOutputComputer = $true
|
||||
}
|
||||
$KeysToLoop
|
||||
}
|
||||
if ($PreCheckOutputComputer -eq $true -or $PreCheckOutputUser -eq $true) {
|
||||
# in some cases GPResult seems to return an error - this was first noticed by user when using Dutch based system
|
||||
# I am not sure if it's possible to fix this error for users, but once that happens checking if GPO is empty fails using the method below
|
||||
# therefore we will use the old method of assuming something is empty or not empty in such case
|
||||
Write-Warning "Get-XMLGPO - Reading GPO content [$DisplayName/$DomainName] returned an error. This may be because of non-english language. Assessing EMPTY using old method which can report false positives. Be careful please."
|
||||
$OutputUser = @()
|
||||
$OutputComputer = @()
|
||||
} else {
|
||||
[Array] $OutputUser = foreach ($ExtensionType in $XMLContent.GPO.User.ExtensionData.Extension) {
|
||||
if ($ExtensionType) {
|
||||
$GPOSettingTypeSplit = ($ExtensionType.type -split ':')
|
||||
try {
|
||||
$KeysToLoop = $ExtensionType | Get-Member -MemberType Properties -ErrorAction Stop | Where-Object { $_.Name -notin 'type', $GPOSettingTypeSplit[0] -and $_.Name -notin @('Blocked') }
|
||||
} catch {
|
||||
Write-Warning "Get-XMLGPO - things went sideways [$DisplayName/$DomainName]. Error $($_.Exception.Message)"
|
||||
continue
|
||||
}
|
||||
}
|
||||
$KeysToLoop
|
||||
}
|
||||
[Array] $OutputComputer = foreach ($ExtensionType in $XMLContent.GPO.Computer.ExtensionData.Extension) {
|
||||
if ($ExtensionType) {
|
||||
$GPOSettingTypeSplit = ($ExtensionType.type -split ':')
|
||||
try {
|
||||
$KeysToLoop = $ExtensionType | Get-Member -MemberType Properties -ErrorAction Stop | Where-Object { $_.Name -notin 'type', $GPOSettingTypeSplit[0] -and $_.Name -notin @('Blocked') }
|
||||
} catch {
|
||||
Write-Warning "Get-XMLGPO - things went sideways [$DisplayName/$DomainName]. Error $($_.Exception.Message)"
|
||||
continue
|
||||
}
|
||||
}
|
||||
$KeysToLoop
|
||||
}
|
||||
|
||||
[bool] $ComputerSettingsAvailable = if ($OutputComputer.Count -gt 0) { $true } else { $false }
|
||||
[bool] $UserSettingsAvailable = if ($OutputUser.Count -gt 0) { $true } else { $false }
|
||||
}
|
||||
|
||||
$ComputerSettingsAvailable = if ($OutputComputer) { $true } else { $false }
|
||||
$UserSettingsAvailable = if ($OutputUser) { $true } else { $false }
|
||||
# Check if there are any GPF files in the GPO
|
||||
# those are special files that are used to store settings for some applications (maily Citrix?)
|
||||
# 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
|
||||
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++
|
||||
}
|
||||
|
||||
if (-not $ComputerSettingsAvailable -and -not $UserSettingsAvailable) {
|
||||
if ($ComputerSettingsAvailable -eq $false -and $UserSettingsAvailable -eq $false -and $GPFFile -eq $false) {
|
||||
$Empty = $true
|
||||
} else {
|
||||
$Empty = $false
|
||||
@@ -197,14 +238,24 @@
|
||||
} elseif ($ADAdministrativeGroups) {
|
||||
$OwnerType = 'Unknown'
|
||||
} else {
|
||||
$OwnerType = 'Unable to asses (local files?)'
|
||||
$OwnerType = 'Unable to assess (local files?)'
|
||||
}
|
||||
}
|
||||
# Mark GPO as excluded
|
||||
$Exclude = $false
|
||||
if ($ExcludeGroupPolicies) {
|
||||
$GUID = $XMLContent.GPO.Identifier.Identifier.'#text'
|
||||
$GUIDWithOutBrackets = $GUID.Replace('{', '').Replace('}', '')
|
||||
$PolicyWithDomain = -join ($XMLContent.GPO.Identifier.Domain.'#text', $XMLContent.GPO.Name)
|
||||
if ($ExcludeGroupPolicies[$XMLContent.GPO.Name] -or $ExcludeGroupPolicies[$PolicyWithDomain]) {
|
||||
$PolicyWithDomainID = -join ($XMLContent.GPO.Identifier.Domain.'#text', $GUID)
|
||||
$PolicyWithDomainIDWithoutBrackets = -join ($XMLContent.GPO.Identifier.Domain.'#text', $GUIDWithOutBrackets)
|
||||
if ($ExcludeGroupPolicies[$XMLContent.GPO.Name] -or
|
||||
$ExcludeGroupPolicies[$PolicyWithDomain] -or
|
||||
$ExcludeGroupPolicies[$PolicyWithDomainID] -or
|
||||
$ExcludeGroupPolicies[$GUID] -or
|
||||
$ExcludeGroupPolicies[$GUIDWithOutBrackets] -or
|
||||
$ExcludeGroupPolicies[$PolicyWithDomainIDWithoutBrackets]
|
||||
) {
|
||||
$Exclude = $true
|
||||
}
|
||||
}
|
||||
@@ -221,6 +272,7 @@
|
||||
'Inherited' = $false
|
||||
'Permissions' = 'Owner'
|
||||
'GPODistinguishedName' = $GPO.Path
|
||||
'GPOSysvolPath' = $SysvolGpoPath
|
||||
}
|
||||
$XMLContent.GPO.SecurityDescriptor.Permissions.TrusteePermissions | ForEach-Object -Process {
|
||||
if ($_) {
|
||||
@@ -249,6 +301,7 @@
|
||||
'OwnerSID' = $XMLContent.GPO.SecurityDescriptor.Owner.SID.'#text'
|
||||
'OwnerType' = $OwnerType
|
||||
'GPODistinguishedName' = $GPO.Path
|
||||
'GPOSysvolPath' = $SysvolGpoPath
|
||||
}
|
||||
} else {
|
||||
$GPOOutput = [PsCustomObject] @{
|
||||
@@ -263,8 +316,10 @@
|
||||
'Problem' = $Problem
|
||||
'ApplyPermission' = $null
|
||||
'Exclude' = $Exclude
|
||||
'Description' = $GPO.Description
|
||||
'ComputerPolicies' = $XMLContent.GPO.Computer.ExtensionData.Name -join ", "
|
||||
'UserPolicies' = $XMLContent.GPO.User.ExtensionData.Name -join ", "
|
||||
'FilesCount' = $FilesCount
|
||||
'LinksCount' = $LinksTotalCount
|
||||
'LinksEnabledCount' = $LinksEnabledCount
|
||||
'LinksDisabledCount' = $LinksDisabledCount
|
||||
@@ -277,8 +332,8 @@
|
||||
'UserSettingsAvailable' = $UserSettingsAvailable
|
||||
#'ComputerSettingsAvailableReal' = $ComputerSettingsAvailableReal
|
||||
#'UserSettingsAvailableReal' = $UserSettingsAvailableReal
|
||||
'ComputerSettingsTypes' = $OutputComputer.Name
|
||||
'UserSettingsTypes' = $OutputUser.Name
|
||||
'ComputerSettingsTypes' = $OutputComputer.Name -join ", "
|
||||
'UserSettingsTypes' = $OutputUser.Name -join ", "
|
||||
'ComputerEnabled' = $ComputerEnabled
|
||||
'UserEnabled' = $UserEnabled
|
||||
'ComputerSettingsStatus' = if ($XMLContent.GPO.Computer.VersionDirectory -eq 0 -and $XMLContent.GPO.Computer.VersionSysvol -eq 0) { "NeverModified" } else { "Modified" }
|
||||
@@ -294,6 +349,7 @@
|
||||
'WMIFilter' = $GPO.WmiFilter.name
|
||||
'WMIFilterDescription' = $GPO.WmiFilter.Description
|
||||
'GPODistinguishedName' = $GPO.Path
|
||||
'GPOSysvolPath' = $SysvolGpoPath
|
||||
'SDDL' = if ($Splitter -ne '') { $XMLContent.GPO.SecurityDescriptor.SDDL.'#text' -join $Splitter } else { $XMLContent.GPO.SecurityDescriptor.SDDL.'#text' }
|
||||
'Owner' = $XMLContent.GPO.SecurityDescriptor.Owner.Name.'#text'
|
||||
'OwnerSID' = $XMLContent.GPO.SecurityDescriptor.Owner.SID.'#text'
|
||||
@@ -361,4 +417,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
ActionRequired = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
Invoke-GPOZaurrContent -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains
|
||||
Invoke-GPOZaurrContent -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -GPOName $GPOName -GPOGUID $GPOGUID
|
||||
}
|
||||
Processing = {
|
||||
|
||||
|
||||
@@ -4,19 +4,231 @@
|
||||
ActionRequired = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
Get-GPOZaurrInheritance -IncludeBlockedObjects -OnlyBlockedInheritance -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains
|
||||
if ($Script:Reporting['GPOBlockedInheritance']['Exclusions']) {
|
||||
Get-GPOZaurrInheritance -IncludeBlockedObjects -IncludeExcludedObjects -OnlyBlockedInheritance -IncludeGroupPoliciesForBlockedObjects -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $Excludeomains -Exclusions $Script:Reporting['GPOBlockedInheritance']['Exclusions']
|
||||
} else {
|
||||
Get-GPOZaurrInheritance -IncludeBlockedObjects -IncludeExcludedObjects -OnlyBlockedInheritance -IncludeGroupPoliciesForBlockedObjects -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $Excludeomains
|
||||
}
|
||||
}
|
||||
Processing = {
|
||||
foreach ($GPO in $Script:Reporting['GPOBlockedInheritance']['Data']) {
|
||||
if (-not $Script:Reporting['GPOBlockedInheritance']['Variables']['DeletionHarmlessPerDomain'][$GPO.DomainName]) {
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['DeletionHarmlessPerDomain'][$GPO.DomainName] = 0
|
||||
}
|
||||
if (-not $Script:Reporting['GPOBlockedInheritance']['Variables']['RequiresInvesigationPerDomain'][$GPO.DomainName]) {
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['RequiresInvesigationPerDomain'][$GPO.DomainName] = 0
|
||||
}
|
||||
if ($GPO.Exclude -eq $true) {
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['Exclude']++
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['UsersAffectedExclude'] = $Script:Reporting['GPOBlockedInheritance']['Variables']['UsersAffectedExclude'] + $GPO.UsersCount
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['ComputersAffectedExclude'] = $Script:Reporting['GPOBlockedInheritance']['Variables']['ComputersAffectedExclude'] + $GPO.ComputersCount
|
||||
} else {
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['UsersAffected'] = $Script:Reporting['GPOBlockedInheritance']['Variables']['UsersAffected'] + $GPO.UsersCount
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['ComputersAffected'] = $Script:Reporting['GPOBlockedInheritance']['Variables']['ComputersAffected'] + $GPO.ComputersCount
|
||||
}
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['UsersAffectedIncludingExclude'] = $Script:Reporting['GPOBlockedInheritance']['Variables']['UsersAffectedIncludingExclude'] + $GPO.UsersCount
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['ComputersAffectedIncludingExclude'] = $Script:Reporting['GPOBlockedInheritance']['Variables']['ComputersAffectedIncludingExclude'] + $GPO.ComputersCount
|
||||
|
||||
if ($GPO.Exclude -eq $false -and ($GPO.UsersCount -gt 0 -or $GPO.ComputersCount -gt 0)) {
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['RequiresInvesigation']++
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['RequiresInvesigationPerDomain'][$GPO.DomainName]++
|
||||
}
|
||||
if ($GPO.Exclude -eq $false -and ($GPO.UsersCount -eq 0 -and $GPO.ComputersCount -eq 0)) {
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['DeletionHarmless']++
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['DeletionHarmlessPerDomain'][$GPO.DomainName]++
|
||||
}
|
||||
# add gpo from blocked inheritance to create additional table
|
||||
#foreach ($GpoBlocked in $Script:Reporting['GPOBlockedInheritance']['Data'].GroupPolicies) {
|
||||
#$Script:Reporting['GPOBlockedInheritance']['Variables']['GroupPolicies'].Add($GpoBlocked)
|
||||
#}
|
||||
}
|
||||
if ($Script:Reporting['GPOBlockedInheritance']['Variables']['RequiresInvesigation'] -gt 0 -or $Script:Reporting['GPOBlockedInheritance']['Variables']['DeletionHarmless'] -gt 0) {
|
||||
$Script:Reporting['GPOBlockedInheritance']['ActionRequired'] = $true
|
||||
} else {
|
||||
$Script:Reporting['GPOBlockedInheritance']['ActionRequired'] = $false
|
||||
}
|
||||
}
|
||||
Resources = @(
|
||||
'http://www.firewall.cx/microsoft-knowledgebase/windows-2012/1056-windows-2012-group-policy-enforcement.html'
|
||||
)
|
||||
Variables = @{
|
||||
|
||||
Total = 0
|
||||
Exclude = 0
|
||||
RequiresInvesigation = 0
|
||||
RequiresInvesigationPerDomain = [ordered] @{}
|
||||
DeletionHarmless = 0
|
||||
DeletionHarmlessPerDomain = [ordered] @{}
|
||||
UsersAffected = 0
|
||||
UsersAffectedExclude = 0
|
||||
UsersAffectedIncludingExclude = 0
|
||||
ComputersAffected = 0
|
||||
ComputersAffectedIncludingExclude = 0
|
||||
ComputersAffectedExclude = 0
|
||||
GroupPolicies = [System.Collections.Generic.List[PSCustomObject]]::new()
|
||||
}
|
||||
Overview = {
|
||||
|
||||
}
|
||||
Summary = {
|
||||
New-HTMLText -FontSize 10pt -TextBlock {
|
||||
"By default, group policy settings that are linked to parent objects are inherited to the child objects in the active directory hierarchy. "
|
||||
"By default, Default Domain Policy is linked to the domain and is inherited to all the child objects of the domain hierarchy. "
|
||||
"So does any other policies linked to the top level OU's. "
|
||||
}
|
||||
New-HTMLText -Text "Blocked Inheritance" -FontSize 10pt -FontWeight bold
|
||||
New-HTMLText -FontSize 10pt -Text @(
|
||||
"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. "
|
||||
)
|
||||
New-HTMLText -Text @(
|
||||
'As it stands currently there are ',
|
||||
$Script:Reporting['GPOBlockedInheritance']['Data'].Count,
|
||||
' organisational units with '
|
||||
'GPO Inheritance Block'
|
||||
' out of which '
|
||||
$Script:Reporting['GPOBlockedInheritance']['Variables']['Exclude'],
|
||||
' are marked as Excluded '
|
||||
'(approved by IT). '
|
||||
) -FontSize 10pt -FontWeight normal, bold, normal, bold, normal, bold, normal, bold -LineBreak
|
||||
if ($Script:Reporting['GPOBlockedInheritance']['Data'].Count -ne 0) {
|
||||
New-HTMLText -Text 'Users & Computers affected by inheritance blocks:' -FontSize 10pt -FontWeight bold
|
||||
New-HTMLList -Type Unordered {
|
||||
New-HTMLListItem -Text $Script:Reporting['GPOBlockedInheritance']['Variables']['UsersAffected'], ' users affected due to inheritance blocks' -FontWeight bold, normal
|
||||
New-HTMLListItem -Text $Script:Reporting['GPOBlockedInheritance']['Variables']['UsersAffectedExclude'], ' users affected, but approved/excluded, due to inheritance blocks' -FontWeight bold, normal
|
||||
New-HTMLListItem -Text $Script:Reporting['GPOBlockedInheritance']['Variables']['ComputersAffected'], ' computers affected due to inheritance blocks' -FontWeight bold, normal
|
||||
New-HTMLListItem -Text $Script:Reporting['GPOBlockedInheritance']['Variables']['ComputersAffectedExclude'], ' computers affected, but approved/excluded, due to inheritance blocks' -FontWeight bold, normal
|
||||
} -FontSize 10pt
|
||||
|
||||
New-HTMLText -Text 'Following domains require:' -FontSize 10pt -FontWeight bold
|
||||
New-HTMLList -Type Unordered {
|
||||
foreach ($Domain in $Script:Reporting['GPOBlockedInheritance']['Variables']['RequiresInvesigationPerDomain'].Keys) {
|
||||
New-HTMLListItem -Text "$Domain proposes ", $Script:Reporting['GPOBlockedInheritance']['Variables']['RequiresInvesigationPerDomain'][$Domain], " investigation (computers or users inside)." -FontWeight normal, bold, normal
|
||||
New-HTMLListItem -Text "$Domain proposes ", $Script:Reporting['GPOBlockedInheritance']['Variables']['DeletionHarmlessPerDomain'][$Domain], " removal (mostly harmless due to no computers or users inside)." -FontWeight normal, bold, normal
|
||||
}
|
||||
} -FontSize 10pt
|
||||
}
|
||||
New-HTMLText -FontSize 10pt -Text "Please review output in table and follow the steps below table to get Active Directory Group Policies in healthy state."
|
||||
|
||||
if ($Script:Reporting['GPOBlockedInheritance']['Exclusions']) {
|
||||
New-HTMLText -LineBreak
|
||||
New-HTMLText -Text @(
|
||||
"While preparing this report following exclusions were defined. "
|
||||
"Please make sure that when you execute your steps to include those exclusions to prevent any issues. "
|
||||
) -FontSize 10pt -FontWeight bold, normal -Color Red, None -LineBreak
|
||||
|
||||
New-HTMLText -Text "Code to use for exclusions: " -FontSize 10pt -FontWeight bold -LineBreak
|
||||
|
||||
$Code = New-GPOZaurrExclusions -ExclusionsArray $Script:Reporting['GPOBlockedInheritance']['Exclusions']
|
||||
|
||||
if ($Code) {
|
||||
New-HTMLCodeBlock -Code $Code -Style powershell
|
||||
}
|
||||
}
|
||||
}
|
||||
Solution = {
|
||||
New-HTMLTable -DataTable $Script:Reporting['GPOBlockedInheritance']['Data'] -Filtering
|
||||
New-HTMLSection -Invisible {
|
||||
New-HTMLPanel {
|
||||
& $Script:GPOConfiguration['GPOBlockedInheritance']['Summary']
|
||||
}
|
||||
New-HTMLPanel {
|
||||
New-HTMLChart {
|
||||
New-ChartLegend -Names 'Affected', 'Affected, but excluded' -Color Salmon, PaleGreen
|
||||
New-ChartBarOptions -Type barStacked
|
||||
New-ChartBar -Name 'Users' -Value $Script:Reporting['GPOBlockedInheritance']['Variables']['UsersAffected'], $Script:Reporting['GPOBlockedInheritance']['Variables']['UsersAffectedExclude']
|
||||
New-ChartBar -Name 'Computers' -Value $Script:Reporting['GPOBlockedInheritance']['Variables']['ComputersAffected'], $Script:Reporting['GPOBlockedInheritance']['Variables']['ComputersAffectedExclude']
|
||||
} -Title 'Users & Computers affected due to blocked inheritance' -TitleAlignment center
|
||||
}
|
||||
}
|
||||
New-HTMLSection -Name 'Organizational Units with Group Policy Blocked Inheritance' {
|
||||
New-HTMLTable -DataTable $Script:Reporting['GPOBlockedInheritance']['Data'] -Filtering {
|
||||
New-TableEvent -TableID 'TableWithGroupPoliciesBlockedInheritance' -SourceColumnID 8 -TargetColumnID 9
|
||||
New-HTMLTableCondition -Name 'Exclude' -Value $true -BackgroundColor DeepSkyBlue -ComparisonType string -Row
|
||||
New-TableConditionGroup {
|
||||
New-TableCondition -Name 'BlockedInheritance' -Value $true
|
||||
New-TableCondition -Name 'Exclude' -Value $false
|
||||
} -BackgroundColor Salmon -FailBackgroundColor SpringGreen -HighlightHeaders 'BlockedInheritance', 'Exclude'
|
||||
New-TableConditionGroup {
|
||||
New-TableCondition -Name 'UsersCount' -Value 0
|
||||
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
|
||||
}
|
||||
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'
|
||||
}
|
||||
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
|
||||
New-HTMLSection -Name 'Steps to fix - Organizational Units with Group Policy Blocked Inheritance' {
|
||||
New-HTMLContainer {
|
||||
New-HTMLSpanStyle -FontSize 10pt {
|
||||
New-HTMLWizard {
|
||||
New-HTMLWizardStep -Name 'Prepare environment' {
|
||||
New-HTMLText -Text "To be able to execute actions in automated way please install required modules. Those modules will be installed straight from Microsoft PowerShell Gallery."
|
||||
New-HTMLCodeBlock -Code {
|
||||
Install-Module GPOZaurr -Force
|
||||
Import-Module GPOZaurr -Force
|
||||
} -Style powershell
|
||||
New-HTMLText -Text "Using force makes sure newest version is downloaded from PowerShellGallery regardless of what is currently installed. Once installed you're ready for next step."
|
||||
}
|
||||
if ($Script:Reporting['GPOBlockedInheritance']['Exclusions']) {
|
||||
New-HTMLWizardStep -Name 'Required exclusions' {
|
||||
New-HTMLText -Text @(
|
||||
"While preparing this report following exclusions were defined. "
|
||||
"Please make sure that when you execute your steps to include those exclusions to prevent any issues. "
|
||||
)
|
||||
$Code = New-GPOZaurrExclusions -ExclusionsArray $Script:Reporting['GPOBlockedInheritance']['Exclusions']
|
||||
|
||||
if ($Code) {
|
||||
New-HTMLCodeBlock -Code $Code -Style powershell
|
||||
}
|
||||
}
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Prepare report' {
|
||||
New-HTMLText -Text @(
|
||||
"Depending when this report was run you may want to prepare new report before proceeding removing Group Policy Inheritance Blocks. "
|
||||
"Please keep in mind that if exclusions for some Organizational OU's were defined you need to pass them to cmdlet below to not remove approved GPO Inheritance Blocks. "
|
||||
"To generate new report please use:"
|
||||
)
|
||||
New-HTMLCodeBlock -Code {
|
||||
Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrBlockedGPOInheritanceBefore.html -Verbose -Type GPOBlockedInheritance
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"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. "
|
||||
}
|
||||
New-HTMLText -Text "Alternatively if you prefer working with console you can run: "
|
||||
New-HTMLCodeBlock -Code {
|
||||
$GPOOutput = Get-GPOZaurrInheritance -IncludeBlockedObjects -IncludeExcludedObjects -OnlyBlockedInheritance
|
||||
$GPOOutput | Format-Table # do your actions as desired
|
||||
}
|
||||
New-HTMLText -Text "It provides same data as you see in table above just doesn't prettify it for you."
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Remove OU GPO Inheritance Blocks' {
|
||||
New-HTMLText -Text @(
|
||||
"Removing inheritance blocks is quite trivial and can be done from GPO GUI. However knowing when to remove is the important part. "
|
||||
"Please consult other Domain Admins before removing any inheritance blocks, and either approve exclusion or remove blocking inheritance. "
|
||||
)
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Verification report' {
|
||||
New-HTMLText -TextBlock {
|
||||
"Once cleanup task was executed properly, we need to verify that report now shows no problems."
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrBlockedGPOInheritanceAfter.html -Verbose -Type GPOBlockedInheritance
|
||||
}
|
||||
New-HTMLText -Text "If everything is healthy in the report you're done! Enjoy rest of the day!" -Color BlueDiamond
|
||||
}
|
||||
} -RemoveDoneStepOnNavigateBack -Theme arrows -ToolbarButtonPosition center -EnableAllAnchors
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($Script:Reporting['GPOBlockedInheritance']['WarningsAndErrors']) {
|
||||
New-HTMLSection -Name 'Warnings & Errors to Review' {
|
||||
New-HTMLTable -DataTable $Script:Reporting['GPOBlockedInheritance']['WarningsAndErrors'] -Filtering {
|
||||
|
||||
@@ -39,11 +39,11 @@ $GPOZaurrBrokenLink = [ordered] @{
|
||||
}
|
||||
Summary = {
|
||||
New-HTMLText -FontSize 10pt -TextBlock {
|
||||
"When GPO is deleted in a proper way it usually is removed from AD, SYSVOL and any link to it is also discarded. "
|
||||
"Unfortunetly this is true only if the GPO is created and linked within same domain. "
|
||||
"If GPO is linked in another domain, this leaves a broken link hanging on wherever it was linked before. "
|
||||
"Additionally Remove-GPO cmdlet doesn't handle site link deletions, which causes dead links to be stuck on sites until those are manually deleted. "
|
||||
"This means that any GPOs deleted using PowerShell may leave trail. "
|
||||
"When GPO is deleted correctly, it usually is removed from AD, SYSVOL, and any link to it is also discarded. "
|
||||
"Unfortunately, this is true only if the GPO is created and linked within the same domain. "
|
||||
"If GPO is linked in another domain, this leaves a broken link hanging on before it was linked. "
|
||||
"Additionally, the Remove-GPO cmdlet doesn't handle site link deletions, which causes dead links to be stuck on sites until those are manually deleted. "
|
||||
"This means that any GPOs deleted using PowerShell may leave a trail."
|
||||
}
|
||||
New-HTMLText -Text @(
|
||||
'As it stands currently there are ',
|
||||
|
||||
@@ -52,11 +52,12 @@
|
||||
}
|
||||
Summary = {
|
||||
New-HTMLText -FontSize 10pt -TextBlock {
|
||||
"When GPO is created it creates an entry in Active Directory (metadata) and SYSVOL (content). "
|
||||
"Two different places meens two different sets of permissions. Group Policy module is making sure the data in both places is correct. "
|
||||
"However, for different reasons it's not nessecary the case and often permissions go out of sync between AD and SYSVOL. "
|
||||
"This test verifies consistency of policies between AD and SYSVOL in two ways. "
|
||||
"It checks top level permissions for a GPO, and then checks if all files within said GPO are inheriting permissions or have different permissions in place. "
|
||||
"When GPO is created, it creates an entry in Active Directory (metadata) and SYSVOL (content). "
|
||||
"Two different places mean two different sets of permissions. "
|
||||
"The group Policy module is making sure the data in both places is correct. "
|
||||
"However, it's not necessarily the case for different reasons, and often permissions go out of sync between AD and SYSVOL. "
|
||||
"This test verifies the consistency of policies between AD and SYSVOL in two ways. "
|
||||
"It checks top-level permissions for a GPO and then checks if all files within said GPO is inheriting permissions or have different permissions in place."
|
||||
}
|
||||
New-HTMLText -Text 'Following list presents ', 'permissions consistency between Active Directory and SYSVOL for Group Policies' -FontSize 10pt -FontWeight normal, bold
|
||||
New-HTMLList -Type Unordered {
|
||||
@@ -111,10 +112,10 @@
|
||||
New-HTMLCodeBlock -Code {
|
||||
Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrPermissionsInconsistentBefore.html -Verbose -Type GPOConsistency
|
||||
}
|
||||
New-HTMLText -Text {
|
||||
New-HTMLText -Text @(
|
||||
"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."
|
||||
}
|
||||
)
|
||||
New-HTMLText -Text "Alternatively if you prefer working with console you can run: "
|
||||
New-HTMLCodeBlock -Code {
|
||||
$GPOOutput = Get-GPOZaurrPermissionConsistency
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
$GPOZaurrGPORedirects = [ordered] @{
|
||||
Name = 'Group Policies With Redirected SYSVOL'
|
||||
Enabled = $false
|
||||
ActionRequired = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
Get-GPOZaurrRedirect -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains
|
||||
}
|
||||
Processing = {
|
||||
foreach ($GPO in $Script:Reporting['GPORedirect']['Data']) {
|
||||
$Script:Reporting['GPORedirect']['Variables']['GPOTotal']++
|
||||
if ($GPO.IsCorrect -eq $true) {
|
||||
$Script:Reporting['GPORedirect']['Variables']['GPOIsCorrect']++
|
||||
} else {
|
||||
$Script:Reporting['GPORedirect']['Variables']['GPOIsNotCorrect']++
|
||||
}
|
||||
}
|
||||
if ($Script:Reporting['GPORedirect']['Variables']['GPOIsNotCorrect'] -gt 0) {
|
||||
$Script:Reporting['GPORedirect']['ActionRequired'] = $true
|
||||
} else {
|
||||
$Script:Reporting['GPORedirect']['ActionRequired'] = $false
|
||||
}
|
||||
}
|
||||
Variables = @{
|
||||
GPOTotal = 0
|
||||
GPOIsCorrect = 0
|
||||
GPOIsNotCorrect = 0
|
||||
}
|
||||
Overview = {
|
||||
|
||||
}
|
||||
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. "
|
||||
"SYSVOL provides a default location for files that must be shared for common access throughout a domain. "
|
||||
"However it is possible to redirect SYSVOL to a different location by modifying "
|
||||
"gPCFileSysPath "
|
||||
"attribute of a GPO. "
|
||||
"This is not recommended and should be avoided, but it can also be a sign of compromise."
|
||||
"This report shows which GPOs are redirected and which are not. "
|
||||
} -FontSize 10pt -LineBreak -FontWeight normal, normal, normal, normal, bold, normal, normal, normal -Color None, None, None, None, RedBerry, None, None, None
|
||||
New-HTMLList -Type Unordered {
|
||||
New-HTMLListItem -Text 'Group Policies in total: ', $Script:Reporting['GPORedirect']['Variables']['GPOTotal'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text 'Group Policies without redirects: ', $Script:Reporting['GPORedirect']['Variables']['GPOIsCorrect'] -FontWeight normal, bold -Color None, MintGreen
|
||||
New-HTMLListItem -Text 'Group Policies with redirects: ', $Script:Reporting['GPORedirect']['Variables']['GPOIsNotCorrect'] -FontWeight normal, bold -Color None, RedBerry
|
||||
} -FontSize 10pt
|
||||
New-HTMLText -TextBlock {
|
||||
"If you notice any GPO with redirect, you should investigate it. "
|
||||
} -FontSize 10pt -LineBreak
|
||||
}
|
||||
Solution = {
|
||||
New-HTMLSection -Invisible {
|
||||
New-HTMLPanel {
|
||||
& $Script:GPOConfiguration['GPORedirect']['Summary']
|
||||
}
|
||||
New-HTMLPanel {
|
||||
New-HTMLChart {
|
||||
New-ChartBarOptions -Type barStacked
|
||||
New-ChartLegend -Name 'No redirects', 'With redirects' -Color MintGreen, MediumOrchid
|
||||
New-ChartBar -Name 'No redirection' -Value $Script:Reporting['GPORedirect']['Variables']['GPOIsCorrect'], $Script:Reporting['GPORedirect']['Variables']['GPOIsNotCorrect']
|
||||
} -Title 'Group Policies with redirects' -TitleAlignment center
|
||||
}
|
||||
}
|
||||
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'
|
||||
}
|
||||
}
|
||||
if ($Script:Reporting['GPORedirect']['WarningsAndErrors']) {
|
||||
New-HTMLSection -Name 'Warnings & Errors to Review' {
|
||||
New-HTMLTable -DataTable $Script:Reporting['GPORedirect']['WarningsAndErrors'] -Filtering {
|
||||
New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row
|
||||
New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
$GPOZaurrGPOUpdates = [ordered] @{
|
||||
Name = 'Group Policies added last 7 days'
|
||||
Enabled = $false
|
||||
Action = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
Get-GPOZaurrUpdates -DateRange Last7Days -DateProperty WhenCreated -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains
|
||||
}
|
||||
Processing = {
|
||||
foreach ($GPO in $Script:Reporting['GPOUpdates']['Data']) {
|
||||
|
||||
$Script:Reporting['GPOUpdates']['Variables']['GPOTotal']++
|
||||
|
||||
if ($GPO.LinksEnabledCount -eq 0) {
|
||||
$Script:Reporting['GPOUpdates']['Variables']['GPOWithoutEnabledLinks']++
|
||||
} else {
|
||||
$Script:Reporting['GPOUpdates']['Variables']['GPOWithEnabledLinks']++
|
||||
}
|
||||
if ($GPO.AffectedCount -eq 0) {
|
||||
$Script:Reporting['GPOUpdates']['Variables']['GPOWithoutAffectedObjects']++
|
||||
}
|
||||
}
|
||||
}
|
||||
Variables = @{
|
||||
GPOTotal = 0
|
||||
GPOWithoutEnabledLinks = 0
|
||||
GPOWithEnabledLinks = 0
|
||||
GPOWithoutAffectedObjects = 0
|
||||
}
|
||||
Overview = {
|
||||
|
||||
}
|
||||
Summary = {
|
||||
New-HTMLText -TextBlock {
|
||||
"Group Policies are important part of Active Directory. Knowing when those are created and what they affect is important part of admins work."
|
||||
"This report shows which GPOs were created in last 7 days and how many objects those are affecting."
|
||||
} -FontSize 10pt -LineBreak
|
||||
New-HTMLList -Type Unordered {
|
||||
New-HTMLListItem -Text 'Group Policies added in last 7 days: ', $Script:Reporting['GPOUpdates']['Variables']['GPOTotal'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text 'Group Policies without enabled links: ', $Script:Reporting['GPOUpdates']['Variables']['GPOWithoutEnabledLinks'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text 'Group Policies with enabled links: ', $Script:Reporting['GPOUpdates']['Variables']['GPOWithEnabledLinks'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text 'Group Policies without affected objects: ', $Script:Reporting['GPOUpdates']['Variables']['GPOWithoutAffectedObjects'] -FontWeight normal, bold
|
||||
|
||||
} -FontSize 10pt
|
||||
New-HTMLText -TextBlock {
|
||||
"If you notice any GPO that is not working or against best practices please reach out to your collegues to confirm whether this is as expected."
|
||||
} -FontSize 10pt -LineBreak
|
||||
}
|
||||
Solution = {
|
||||
New-HTMLSection -Invisible {
|
||||
New-HTMLPanel {
|
||||
& $Script:GPOConfiguration['GPOUpdates']['Summary']
|
||||
}
|
||||
New-HTMLPanel {
|
||||
New-HTMLChart {
|
||||
New-ChartBarOptions -Type barStacked
|
||||
New-ChartLegend -Name 'No enabled links', 'Enabled links' -Color Crimson, MediumOrchid
|
||||
New-ChartBar -Name 'Links enabled' -Value $Script:Reporting['GPOUpdates']['Variables']['GPOWithoutEnabledLinks'], $Script:Reporting['GPOUpdates']['Variables']['GPOWithEnabledLinks']
|
||||
} -Title 'Group Policies created last 7 days' -TitleAlignment center
|
||||
}
|
||||
}
|
||||
New-HTMLSection -Name 'Group Policies added in last 7 days' {
|
||||
New-HTMLTable -DataTable $Script:Reporting['GPOUpdates']['Data'] -Filtering {
|
||||
#New-HTMLTableCondition -Name 'LinksCount' -Value 0 -BackgroundColor Salmon -ComparisonType number
|
||||
#New-HTMLTableCondition -Name 'LinksEnabledCount' -Value 0 -BackgroundColor Salmon -ComparisonType number
|
||||
New-HTMLTableCondition -Name 'AffectedCount' -Value 0 -BackgroundColor Salmon -ComparisonType number -FailBackgroundColor Goldenrod
|
||||
New-HTMLTableConditionGroup {
|
||||
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'
|
||||
}
|
||||
}
|
||||
if ($Script:Reporting['GPOUpdates']['WarningsAndErrors']) {
|
||||
New-HTMLSection -Name 'Warnings & Errors to Review' {
|
||||
New-HTMLTable -DataTable $Script:Reporting['GPOUpdates']['WarningsAndErrors'] -Filtering {
|
||||
New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row
|
||||
New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+123
-69
@@ -4,9 +4,8 @@
|
||||
Action = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
if ($Script:Reporting['GPOList']['ExclusionsCode']) {
|
||||
Get-GPOZaurr -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExcludeGroupPolicies $Script:Reporting['GPOList']['ExclusionsCode']
|
||||
|
||||
if ($Script:Reporting['GPOList']['Exclusions']) {
|
||||
Get-GPOZaurr -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExcludeGroupPolicies $Script:Reporting['GPOList']['Exclusions']
|
||||
} else {
|
||||
Get-GPOZaurr -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains
|
||||
}
|
||||
@@ -49,12 +48,20 @@
|
||||
}
|
||||
|
||||
if ($GPO.Days -le $Script:Reporting['GPOList']['Variables']['GPOOlderThan']) {
|
||||
# Skip GPOS that are younger than 7 days
|
||||
# Skip GPOS that are younger than 30 days
|
||||
$Script:Reporting['GPOList']['Variables']['GPOSkip']++
|
||||
}
|
||||
if (($GPO.Enabled -eq $false -or $GPO.Empty -eq $true -or $GPO.Linked -eq $false -or $GPO.ApplyPermission -eq $false) -and $GPO.Days -le $Script:Reporting['GPOList']['Variables']['GPOOlderThan']) {
|
||||
# Skip GPOS that are younger than 7 days
|
||||
if ($GPO.Exclude -eq $true) {
|
||||
# Skip GPOS that are excluded
|
||||
$Script:Reporting['GPOList']['Variables']['GPOSkipExcluded']++
|
||||
}
|
||||
if (($GPO.Enabled -eq $false -or $GPO.Empty -eq $true -or $GPO.Linked -eq $false -or $GPO.ApplyPermission -eq $false) -and $GPO.Exclude -eq $true) {
|
||||
$Script:Reporting['GPOList']['Variables']['GPONotValidButExcluded']++
|
||||
$Script:Reporting['GPOList']['Variables']['GPONotValidButSkippedOrExcluded']++
|
||||
} elseif (($GPO.Enabled -eq $false -or $GPO.Empty -eq $true -or $GPO.Linked -eq $false -or $GPO.ApplyPermission -eq $false) -and $GPO.Days -le $Script:Reporting['GPOList']['Variables']['GPOOlderThan']) {
|
||||
# Skip GPOS that are younger than 30 days
|
||||
$Script:Reporting['GPOList']['Variables']['GPONotValidButSkip']++
|
||||
$Script:Reporting['GPOList']['Variables']['GPONotValidButSkippedOrExcluded']++
|
||||
}
|
||||
if (($GPO.Enabled -eq $false -or $GPO.Empty -eq $true -or $GPO.Linked -eq $false -or $GPO.ApplyPermission -eq $false) -and $GPO.Days) {
|
||||
$Script:Reporting['GPOList']['Variables']['GPONotValid']++
|
||||
@@ -142,52 +149,55 @@
|
||||
}
|
||||
}
|
||||
$Script:Reporting['GPOList']['Variables']['GPOTotal'] = $Script:Reporting['GPOList']['Data'].Count
|
||||
if ($Script:Reporting['GPOList']['Variables']['GPONotValid'] -gt 0 -and $Script:Reporting['GPOList']['Variables']['GPONotValidButSkip'] -ne $Script:Reporting['GPOList']['Variables']['GPONotValid']) {
|
||||
if ($Script:Reporting['GPOList']['Variables']['GPONotValid'] -gt 0 -and $Script:Reporting['GPOList']['Variables']['GPONotValidButSkippedOrExcluded'] -ne $Script:Reporting['GPOList']['Variables']['GPONotValid']) {
|
||||
$Script:Reporting['GPOList']['ActionRequired'] = $true
|
||||
} else {
|
||||
$Script:Reporting['GPOList']['ActionRequired'] = $false
|
||||
}
|
||||
}
|
||||
Variables = @{
|
||||
GPOOlderThan = 7
|
||||
GPONotValidPerDomain = $null
|
||||
GPOValidPerDomain = $null
|
||||
GPONotOptimizedPerDomain = $null
|
||||
GPOOptimizedPerDomain = $null
|
||||
GPOProblemPerDomain = $null
|
||||
GPONoProblemPerDomain = $null
|
||||
GPOApplyPermissionYesPerDomain = $null
|
||||
GPOApplyPermissionNoPerDomain = $null
|
||||
GPOWithProblems = 0
|
||||
ComputerOptimizedYes = 0
|
||||
ComputerOptimizedNo = 0
|
||||
ComputerProblemYes = 0
|
||||
ComputerProblemNo = 0
|
||||
UserOptimizedYes = 0
|
||||
UserOptimizedNo = 0
|
||||
UserProblemYes = 0
|
||||
UserProblemNo = 0
|
||||
GPOOptimized = 0
|
||||
GPONotOptimized = 0
|
||||
GPOProblem = 0
|
||||
GPONoProblem = 0
|
||||
GPONotLinked = 0
|
||||
GPOLinked = 0
|
||||
GPOEmpty = 0
|
||||
GPONotEmpty = 0
|
||||
GPOEmptyAndUnlinked = 0
|
||||
GPOEmptyOrUnlinked = 0
|
||||
GPOLinkedButEmpty = 0
|
||||
GPOEnabled = 0
|
||||
GPODisabled = 0
|
||||
GPOSkip = 0
|
||||
GPOValid = 0
|
||||
GPONotValid = 0
|
||||
GPONotValidButSkip = 0
|
||||
GPOLinkedButLinkDisabled = 0
|
||||
GPOTotal = 0
|
||||
ApplyPermissionYes = 0
|
||||
ApplyPermissionNo = 0
|
||||
GPOOlderThan = 30
|
||||
GPONotValidPerDomain = $null
|
||||
GPOValidPerDomain = $null
|
||||
GPONotOptimizedPerDomain = $null
|
||||
GPOOptimizedPerDomain = $null
|
||||
GPOProblemPerDomain = $null
|
||||
GPONoProblemPerDomain = $null
|
||||
GPOApplyPermissionYesPerDomain = $null
|
||||
GPOApplyPermissionNoPerDomain = $null
|
||||
GPOWithProblems = 0
|
||||
ComputerOptimizedYes = 0
|
||||
ComputerOptimizedNo = 0
|
||||
ComputerProblemYes = 0
|
||||
ComputerProblemNo = 0
|
||||
UserOptimizedYes = 0
|
||||
UserOptimizedNo = 0
|
||||
UserProblemYes = 0
|
||||
UserProblemNo = 0
|
||||
GPOOptimized = 0
|
||||
GPONotOptimized = 0
|
||||
GPOProblem = 0
|
||||
GPONoProblem = 0
|
||||
GPONotLinked = 0
|
||||
GPOLinked = 0
|
||||
GPOEmpty = 0
|
||||
GPONotEmpty = 0
|
||||
GPOEmptyAndUnlinked = 0
|
||||
GPOEmptyOrUnlinked = 0
|
||||
GPOLinkedButEmpty = 0
|
||||
GPOEnabled = 0
|
||||
GPODisabled = 0
|
||||
GPOSkip = 0
|
||||
GPOSkipExcluded = 0
|
||||
GPOValid = 0
|
||||
GPONotValid = 0
|
||||
GPONotValidButSkip = 0
|
||||
GPONotValidButExcluded = 0
|
||||
GPONotValidButSkippedOrExcluded = 0
|
||||
GPOLinkedButLinkDisabled = 0
|
||||
GPOTotal = 0
|
||||
ApplyPermissionYes = 0
|
||||
ApplyPermissionNo = 0
|
||||
}
|
||||
Overview = {
|
||||
|
||||
@@ -203,6 +213,7 @@
|
||||
New-HTMLList -Type Unordered {
|
||||
New-HTMLListItem -Text 'Group Policies total: ', $Script:Reporting['GPOList']['Variables']['GPOTotal'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text "Group Policies valid: ", $Script:Reporting['GPOList']['Variables']['GPOValid'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text "Group Policies exclusions defined: ", $Script:Reporting['GPOList']['Variables']['GPOSkipExcluded'] -FontWeight normal, bold -Color None, DeepSkyBlue
|
||||
New-HTMLListItem -Text "Group Policies ", "NOT", " valid: ", $Script:Reporting['GPOList']['Variables']['GPONotValid'] -FontWeight normal, bold, normal, bold {
|
||||
New-HTMLList -Type Unordered {
|
||||
New-HTMLListItem -Text 'Group Policies that are unlinked (are not doing anything currently): ', $Script:Reporting['GPOList']['Variables']['GPONotLinked'] -FontWeight normal, bold
|
||||
@@ -214,9 +225,12 @@
|
||||
}
|
||||
} -Color Black, Red, Black, Red, Black
|
||||
New-HTMLListItem -Text @(
|
||||
"Group Policies ", "NOT", " valid, to skip: ", $Script:Reporting['GPOList']['Variables']['GPONotValidButSkip'], " (not older than $($Script:Reporting['GPOList']['Variables']['GPOOlderThan']) days)"
|
||||
"Group Policies ", "NOT", " valid, to skip (because of age): ", $Script:Reporting['GPOList']['Variables']['GPONotValidButSkip'], " (modified less than $($Script:Reporting['GPOList']['Variables']['GPOOlderThan']) days ago)"
|
||||
) -FontWeight 'normal', 'bold', 'normal', 'bold', 'normal' -Color 'Black', 'Red', 'Black', 'Red', 'Black'
|
||||
New-HTMLListItem -Text "Group Policies younger than $($Script:Reporting['GPOList']['Variables']['GPOOlderThan']) days: ", $Script:Reporting['GPOList']['Variables']['GPOSkip'], " (not older than $($Script:Reporting['GPOList']['Variables']['GPOOlderThan']) days)" -FontWeight normal, bold
|
||||
New-HTMLListItem -Text @(
|
||||
"Group Policies ", "NOT", " valid, to skip (because of exclusions): ", $Script:Reporting['GPOList']['Variables']['GPONotValidButExcluded']
|
||||
) -FontWeight 'normal', 'bold', 'normal', 'bold', 'normal' -Color 'Black', 'Red', 'Black', 'Red', 'Black'
|
||||
New-HTMLListItem -Text "Group Policies recently modified: ", $Script:Reporting['GPOList']['Variables']['GPOSkip'], " (modified less than $($Script:Reporting['GPOList']['Variables']['GPOOlderThan']) days ago)" -FontWeight normal, bold
|
||||
} -FontSize 10pt
|
||||
|
||||
New-HTMLText -Text 'Following domains require actions (permissions required):' -FontSize 10pt -FontWeight bold
|
||||
@@ -295,10 +309,26 @@
|
||||
# Just in case report is too big and the full file is not attached
|
||||
New-HTMLText -FontSize 10pt -Text "To generate up to date report please execute: " -FontWeight bold
|
||||
New-HTMLList -Type Unordered {
|
||||
New-HTMLListItem -Text 'Install-Module GPOZaurr -Force', ' or ', ' install module manually.' -FontWeight bold, normal, bold
|
||||
New-HTMLListItem -Text 'Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrGPOPListBefore.html -Verbose -Type GPOList' -FontWeight bold
|
||||
New-HTMLListItem -Text 'Install-Module GPOZaurr -Force', ' or ', ' install module manually.' -Color RoyalBlue, None, None
|
||||
New-HTMLListItem -Text 'Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrGPOPListBefore.html -Verbose -Type GPOList' -Color RoyalBlue
|
||||
} -FontSize 10pt
|
||||
New-HTMLText -FontSize 10pt -Text 'Steps above will generate above summary with more details allowing you to get up to date report and steps on how to fix it.'
|
||||
|
||||
if ($Script:Reporting['GPOList']['Exclusions']) {
|
||||
New-HTMLText -LineBreak
|
||||
New-HTMLText -Text @(
|
||||
"While preparing this report following exclusions were defined. "
|
||||
"Please make sure that when you execute your steps to include those exclusions to prevent any issues. "
|
||||
) -FontSize 10pt -FontWeight bold, normal -Color Red, None -LineBreak
|
||||
|
||||
New-HTMLText -Text "Code to use for exclusions: " -FontSize 10pt -FontWeight bold -LineBreak
|
||||
|
||||
$Code = New-GPOZaurrExclusions -ExclusionsArray $Script:Reporting['GPOList']['Exclusions']
|
||||
|
||||
if ($Code) {
|
||||
New-HTMLCodeBlock -Code $Code -Style powershell
|
||||
}
|
||||
}
|
||||
}
|
||||
Solution = {
|
||||
New-HTMLSection -Invisible {
|
||||
@@ -375,6 +405,18 @@
|
||||
} -Style powershell
|
||||
New-HTMLText -Text "Using force makes sure newest version is downloaded from PowerShellGallery regardless of what is currently installed. Once installed you're ready for next step."
|
||||
}
|
||||
if ($Script:Reporting['GPOList']['Exclusions']) {
|
||||
New-HTMLWizardStep -Name 'Required exclusions' {
|
||||
New-HTMLText -Text @(
|
||||
"While preparing this report following exclusions were defined. "
|
||||
"Please make sure that when you execute your steps to include those exclusions to prevent any issues. "
|
||||
)
|
||||
$Code = New-GPOZaurrExclusions -ExclusionsArray $Script:Reporting['GPOList']['Exclusions']
|
||||
if ($Code) {
|
||||
New-HTMLCodeBlock -Code $Code -Style powershell
|
||||
}
|
||||
}
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Prepare report' {
|
||||
New-HTMLText -Text "Depending when this report was run you may want to prepare new report before proceeding with removal. To generate new report please use:"
|
||||
New-HTMLCodeBlock -Code {
|
||||
@@ -415,11 +457,14 @@
|
||||
"You would do so using following approach "
|
||||
) -FontSize 10pt -FontWeight bold, normal
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Empty, Unlinked, Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor' {
|
||||
$Exclusions = {
|
||||
Skip-GroupPolicy -Name 'TEST | Drive Mapping'
|
||||
Skip-GroupPolicy -Name 'Default Domain Policy'
|
||||
Skip-GroupPolicy -Name 'Default Domain Controllers Policy' -DomaiName 'JustOneDomain'
|
||||
} -WhatIf
|
||||
'{D39BF08A-87BF-4662-BFA0-E56240EBD5A2}'
|
||||
'COMPUTERS | Enable Sets'
|
||||
}
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Empty, Unlinked, Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor' -WhatIf -ExcludeGroupPolicies $Exclusions
|
||||
}
|
||||
New-HTMLText -Text @(
|
||||
"Code above when executed will scan YourDomainYouHavePermissionsFor, find all empty, unlinked, disabled group policies, backup any GPO just before it's to be deleted to `$Env:UserProfile\Desktop\GPO. "
|
||||
@@ -428,6 +473,13 @@
|
||||
"Now go ahead and find what's there"
|
||||
)
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Remove GPOs (Manual)' {
|
||||
New-HTMLText -Text @(
|
||||
"Please condider deleting GPOs manually if the amount of GPOs to delete is small enough. "
|
||||
"Deleting 1-5-30 GPOs manually on domain of 4000 GPOs will be much faster than doing it in controlled manner with automated steps mentioned on next steps. "
|
||||
"What can take 30 minutes manually, can take 8 hours using automated script, because of amount of checks required by the script over and over to delete a single GPO. "
|
||||
) -FontWeight normal, bold, normal, bold, normal, bold, normal, normal -Color Black, Red, Black, Red, Black
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Remove GPOs that are EMPTY' {
|
||||
New-HTMLText -Text @(
|
||||
"Following command when executed removes every ",
|
||||
@@ -439,26 +491,26 @@
|
||||
"You can skip parameters related to backup if you did backup all GPOs prior to running remove command. "
|
||||
) -FontWeight normal, bold, normal, bold, normal, bold, normal, normal -Color Black, Red, Black, Red, Black
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Empty -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Empty -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: "
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Empty -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Empty -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"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. "
|
||||
} -LineBreak
|
||||
New-HTMLText -Text "Once happy with results please follow with command (this will start fixing process): " -LineBreak -FontWeight bold
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Empty -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Empty -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: "
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Empty -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Empty -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"This command when executed deletes only first X empty GPOs. Use LimitProcessing parameter to prevent mass delete and increase the counter when no errors occur."
|
||||
@@ -478,26 +530,26 @@
|
||||
"You can skip parameters related to backup if you did backup all GPOs prior to running remove command. "
|
||||
) -FontWeight normal, bold, normal, bold, normal, bold, normal, normal -Color Black, Red, Black, Red, Black
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: "
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"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. "
|
||||
} -LineBreak
|
||||
New-HTMLText -Text "Once happy with results please follow with command (this will start fixing process): " -LineBreak -FontWeight bold
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: "
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Unlinked -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"This command when executed deletes only first X unlinked GPOs. Use LimitProcessing parameter to prevent mass delete and increase the counter when no errors occur."
|
||||
@@ -520,26 +572,26 @@
|
||||
""
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: "
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"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. "
|
||||
} -LineBreak
|
||||
New-HTMLText -Text "Once happy with results please follow with command (this will start fixing process): " -LineBreak -FontWeight bold
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: "
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
Remove-GPOZaurr -RequireDays 30 -Type Disabled -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"This command when executed deletes only first X disabled GPOs. Use LimitProcessing parameter to prevent mass delete and increase the counter when no errors occur. "
|
||||
@@ -562,26 +614,26 @@
|
||||
""
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type NoApplyPermission -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf
|
||||
Remove-GPOZaurr -RequireDays 30 -Type NoApplyPermission -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: "
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type NoApplyPermission -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
Remove-GPOZaurr -RequireDays 30 -Type NoApplyPermission -BackupPath "$Env:UserProfile\Desktop\GPO" -Verbose -WhatIf -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"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. "
|
||||
} -LineBreak
|
||||
New-HTMLText -Text "Once happy with results please follow with command (this will start fixing process): " -LineBreak -FontWeight bold
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type NoApplyPermission -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose
|
||||
Remove-GPOZaurr -RequireDays 30 -Type NoApplyPermission -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: "
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurr -RequireDays 7 -Type NoApplyPermission -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
Remove-GPOZaurr -RequireDays 30 -Type NoApplyPermission -BackupPath "$Env:UserProfile\Desktop\GPO" -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"This command when executed deletes only first X NoApplyPermission GPOs. Use LimitProcessing parameter to prevent mass delete and increase the counter when no errors occur. "
|
||||
@@ -639,6 +691,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
<#
|
||||
if ($Script:Reporting['GPOList']['Exclusions']) {
|
||||
New-HTMLSection -Invisible {
|
||||
New-HTMLSection -Name 'Group Policies Exclusions' {
|
||||
@@ -649,11 +702,12 @@
|
||||
New-HTMLSection -Name 'Group Policies Exclusions Code' {
|
||||
New-HTMLContainer {
|
||||
New-HTMLText -Text 'Please make sure to use following exclusions when executing removal' -FontSize 10pt
|
||||
New-HTMLCodeBlock -Code $Script:Reporting['GPOList']['ExclusionsCode']
|
||||
New-HTMLCodeBlock -Code $Script:Reporting['GPOList']['Exclusions']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#>
|
||||
}
|
||||
if ($Script:Reporting['GPOList']['WarningsAndErrors']) {
|
||||
New-HTMLSection -Name 'Errors to Review' {
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
$GPOZaurrMissingFiles = [ordered] @{
|
||||
Name = 'Group Policies with missing files'
|
||||
Enabled = $true
|
||||
Action = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
Get-GPOZaurrMissingFiles -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -GPOName $GPOName -GPOGUID $GPOGUID | Sort-Object -Property ErrorCount -Descending
|
||||
}
|
||||
Processing = {
|
||||
foreach ($GPO in $Script:Reporting['GPOBrokenPartially']['Data']) {
|
||||
if ($GPO.ErrorCount -gt 0) {
|
||||
$Script:Reporting['GPOBrokenPartially']['Variables']['RequireFixing']++
|
||||
}
|
||||
}
|
||||
if ($Script:Reporting['GPOBrokenPartially']['Variables']['RequireFixing'] -gt 0) {
|
||||
$Script:Reporting['GPOBrokenPartially']['ActionRequired'] = $true
|
||||
} else {
|
||||
$Script:Reporting['GPOBrokenPartially']['ActionRequired'] = $false
|
||||
}
|
||||
}
|
||||
Variables = @{
|
||||
RequireFixing = 0
|
||||
}
|
||||
Overview = {
|
||||
|
||||
}
|
||||
Resources = @(
|
||||
|
||||
)
|
||||
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. "
|
||||
"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. "
|
||||
"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. "
|
||||
"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
|
||||
}
|
||||
Solution = {
|
||||
New-HTMLSection -Invisible {
|
||||
New-HTMLPanel {
|
||||
& $Script:GPOConfiguration['GPOBrokenPartially']['Summary']
|
||||
}
|
||||
New-HTMLPanel {
|
||||
New-HTMLChart {
|
||||
New-ChartLegend -Names 'Bad' -Color Salmon
|
||||
New-ChartBar -Name 'Missing Files' -Value $Script:Reporting['GPOBrokenPartially']['Variables']['RequireFixing']
|
||||
} -Title 'Group Policies with Missing Files' -TitleAlignment center
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
|
||||
New-HTMLSection -Name 'Steps to fix - Remove duplicate (CNF) objects' {
|
||||
New-HTMLContainer {
|
||||
New-HTMLSpanStyle -FontSize 10pt {
|
||||
New-HTMLWizard {
|
||||
New-HTMLWizardStep -Name 'Prepare environment' {
|
||||
New-HTMLText -Text "To be able to execute actions in automated way please install required modules. Those modules will be installed straight from Microsoft PowerShell Gallery."
|
||||
New-HTMLCodeBlock -Code {
|
||||
Install-Module GPOZaurr -Force
|
||||
Import-Module GPOZaurr -Force
|
||||
} -Style powershell
|
||||
New-HTMLText -Text "Using force makes sure newest version is downloaded from PowerShellGallery regardless of what is currently installed. Once installed you're ready for next step."
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Prepare report' {
|
||||
New-HTMLText -Text "Depending when this report was run you may want to prepare new report before proceeding fixing duplicate GPO objects. To generate new report please use:"
|
||||
New-HTMLCodeBlock -Code {
|
||||
Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrMissingFilesBefore.html -Verbose -Type GPOMissingFiles
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"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. "
|
||||
}
|
||||
New-HTMLText -Text "Alternatively if you prefer working with console you can run: "
|
||||
New-HTMLCodeBlock -Code {
|
||||
$GPOOutput = Get-GPOZaurrMissingFiles -BrokenOnly
|
||||
$GPOOutput | Format-Table # do your actions as desired
|
||||
}
|
||||
New-HTMLText -Text "It provides same data as you see in table above just doesn't prettify it for you."
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Remove Broken objects' {
|
||||
New-HTMLText -Text "There is no automated way to fix missing files. You need to manually fix them. "
|
||||
New-HTMLText -Text "You can do so by restoring files from backup or removing section completly. "
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Verification report' {
|
||||
New-HTMLText -TextBlock {
|
||||
"Once cleanup task was executed properly, we need to verify that report now shows no problems."
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrMissingFilesAfter.html -Verbose -Type GPOMissingFiles
|
||||
}
|
||||
New-HTMLText -Text "If everything is healthy in the report you're done! Enjoy rest of the day!" -Color BlueDiamond
|
||||
}
|
||||
} -RemoveDoneStepOnNavigateBack -Theme arrows -ToolbarButtonPosition center -EnableAllAnchors
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($Script:Reporting['GPOBrokenPartially']['WarningsAndErrors']) {
|
||||
New-HTMLSection -Name 'Warnings & Errors to Review' {
|
||||
New-HTMLTable -DataTable $Script:Reporting['GPOZaurrMissingFiles']['WarningsAndErrors'] -Filtering {
|
||||
New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row
|
||||
New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,97 +125,6 @@
|
||||
New-HTMLText -Text "Please review output in table and follow the steps below table to get NetLogon permissions in order." -FontSize 10pt
|
||||
}
|
||||
Solution = {
|
||||
# New-HTMLTab -Name 'NetLogon Owners' {
|
||||
# New-HTMLSection -Invisible {
|
||||
# New-HTMLPanel {
|
||||
# & $Script:GPOConfiguration['NetLogonPermissions']['Summary']
|
||||
# }
|
||||
# New-HTMLPanel {
|
||||
# New-HTMLChart {
|
||||
# New-ChartPie -Name 'Correct Owners' -Value $Script:Reporting['NetLogonPermissions']['Variables']['NetLogonOwnersAdministrators'] -Color LightGreen
|
||||
# New-ChartPie -Name 'Incorrect Owners' -Value $Script:Reporting['NetLogonPermissions']['Variables']['NetLogonOwnersToFix'] -Color Crimson
|
||||
# } -Title 'NetLogon Owners' -TitleAlignment center
|
||||
# }
|
||||
# }
|
||||
# New-HTMLSection -Name 'NetLogon File Owners' {
|
||||
# New-HTMLTable -DataTable $Script:Reporting['NetLogonPermissions']['Variables']['Owner'] -Filtering {
|
||||
# New-HTMLTableCondition -Name 'PrincipalSid' -Value "S-1-5-32-544" -BackgroundColor LightGreen -ComparisonType string
|
||||
# New-HTMLTableCondition -Name 'PrincipalSid' -Value "S-1-5-32-544" -BackgroundColor Salmon -ComparisonType string -Operator ne
|
||||
# New-HTMLTableCondition -Name 'PrincipalType' -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
|
||||
# }
|
||||
# }
|
||||
# New-HTMLSection -Name 'Steps to fix NetLogon Owners ' {
|
||||
# New-HTMLContainer {
|
||||
# New-HTMLSpanStyle -FontSize 10pt {
|
||||
# New-HTMLText -Text 'Following steps will guide you how to fix NetLogon Owners and make them compliant.'
|
||||
# New-HTMLWizard {
|
||||
# New-HTMLWizardStep -Name 'Prepare environment' {
|
||||
# New-HTMLText -Text "To be able to execute actions in automated way please install required modules. Those modules will be installed straight from Microsoft PowerShell Gallery."
|
||||
# New-HTMLCodeBlock -Code {
|
||||
# Install-Module GPOZaurr -Force
|
||||
# Import-Module GPOZaurr -Force
|
||||
# } -Style powershell
|
||||
# New-HTMLText -Text "Using force makes sure newest version is downloaded from PowerShellGallery regardless of what is currently installed. Once installed you're ready for next step."
|
||||
# }
|
||||
# New-HTMLWizardStep -Name 'Prepare report' {
|
||||
# New-HTMLText -Text "Depending when this report was run you may want to prepare new report before proceeding with removal. To generate new report please use:"
|
||||
# New-HTMLCodeBlock -Code {
|
||||
# Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrNetLogonBefore.html -Verbose -Type NetLogon
|
||||
# }
|
||||
# New-HTMLText -TextBlock {
|
||||
# "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."
|
||||
# }
|
||||
# New-HTMLText -Text "Alternatively if you prefer working with console you can run: "
|
||||
# New-HTMLCodeBlock -Code {
|
||||
# $NetLogonOutput = Get-GPOZaurrNetLogon -OwnerOnly -Verbose
|
||||
# $NetLogonOutput | Format-Table
|
||||
# }
|
||||
# New-HTMLText -Text "It provides same data as you see in table above just doesn't prettify it for you."
|
||||
# }
|
||||
# New-HTMLWizardStep -Name 'Set non-compliant file owners to BUILTIN\Administrators' {
|
||||
# New-HTMLText -Text "Following command when executed runs internally command that lists all file owners and if it doesn't match changes it BUILTIN\Administrators. It doesn't change compliant owners."
|
||||
# New-HTMLText -Text "Make sure when running it for the first time to run it with ", "WhatIf", " parameter as shown below to prevent accidental removal." -FontWeight normal, bold, normal -Color Black, Red, Black
|
||||
|
||||
# New-HTMLCodeBlock -Code {
|
||||
# Repair-GPOZaurrNetLogonOwner -Verbose -WhatIf
|
||||
# }
|
||||
# New-HTMLText -TextBlock {
|
||||
# "After execution please make sure there are no errors, make sure to review provided output, and confirm that what is about to be changed matches expected data. Once happy with results please follow with command: "
|
||||
# }
|
||||
# New-HTMLCodeBlock -Code {
|
||||
# Repair-GPOZaurrNetLogonOwner -Verbose -LimitProcessing 2
|
||||
# }
|
||||
# New-HTMLText -TextBlock {
|
||||
# "This command when executed sets new owner only on first X non-compliant NetLogon files. Use LimitProcessing parameter to prevent mass change and increase the counter when no errors occur."
|
||||
# "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."
|
||||
# }
|
||||
# }
|
||||
# New-HTMLWizardStep -Name 'Verification report' {
|
||||
# New-HTMLText -TextBlock {
|
||||
# "Once cleanup task was executed properly, we need to verify that report now shows no problems."
|
||||
# }
|
||||
# New-HTMLCodeBlock -Code {
|
||||
# Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrNetLogonAfter.html -Verbose -Type NetLogon
|
||||
# }
|
||||
# New-HTMLText -Text "If everything is healthy in the report you're done! Enjoy rest of the day!" -Color BlueDiamond
|
||||
# }
|
||||
# } -RemoveDoneStepOnNavigateBack -Theme arrows -ToolbarButtonPosition center -EnableAllAnchors
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# if ($Script:Reporting['NetLogonPermissions']['WarningsAndErrors']) {
|
||||
# New-HTMLSection -Name 'Warnings & Errors to Review' {
|
||||
# New-HTMLTable -DataTable $Script:Reporting['NetLogonPermissions']['WarningsAndErrors'] -Filtering {
|
||||
# New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row
|
||||
# New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
#New-HTMLTab -Name 'NetLogon Permissions' {
|
||||
New-HTMLSection -Invisible {
|
||||
New-HTMLPanel {
|
||||
& $Script:GPOConfiguration['NetLogonPermissions']['Summary']
|
||||
@@ -272,6 +181,7 @@
|
||||
New-HTMLText -Text @(
|
||||
"In case of NETLOGON permissions it's impossible to tell what in a given moment for given domain should be automatically removed except for the very obvious ",
|
||||
"unknown ", 'permissions. Domain Admins have to make their assesment on and remove permissions from users or groups that '
|
||||
"they think do not belong. "
|
||||
) -FontWeight normal, bold, normal
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Verification report' {
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
$GPOZaurrOrganizationalUnit = [ordered] @{
|
||||
Name = 'Group Policy Organizational Units'
|
||||
Enabled = $true
|
||||
ActionRequired = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
if ($Script:Reporting['GPOOrganizationalUnit']['Exclusions']) {
|
||||
Get-GPOZaurrOrganizationalUnit -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExcludeOrganizationalUnit $Script:Reporting['GPOOrganizationalUnit']['Exclusions']
|
||||
} else {
|
||||
Get-GPOZaurrOrganizationalUnit -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains
|
||||
}
|
||||
}
|
||||
Processing = {
|
||||
# Create Per Domain Variables
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['RequiresDiffFixPerDomain'] = @{}
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFixPerDomain'] = @{}
|
||||
foreach ($OU in $Script:Reporting['GPOOrganizationalUnit']['Data']) {
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['TotalOU']++
|
||||
# Create Per Domain Variables
|
||||
if (-not $Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFixPerDomain'][$OU.DomainName]) {
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFixPerDomain'][$OU.DomainName] = 0
|
||||
}
|
||||
if ($OU.Status -contains 'Unlink GPO' -and $OU.Status -contains 'Delete OU') {
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['UnlinkGPOEmpty']++
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFix']++
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFixPerDomain'][$OU.DomainName]++
|
||||
} elseif ($OU.Status -contains 'Unlink GPO') {
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['UnlinkGPO']++
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFix']++
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFixPerDomain'][$OU.DomainName]++
|
||||
} elseif ($OU.Status -contains 'Delete OU') {
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['DeleteOU']++
|
||||
#$Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFix']++
|
||||
#$Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFixPerDomain'][$OU.DomainName]++
|
||||
} elseif ($OU.Status -contains 'Excluded' -or $OU.Status -contains 'Excluded, Default OU') {
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['Excluded']++
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['ExcludedOU'].Add($OU.Organizationalunit)
|
||||
} else {
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['Legitimate']++
|
||||
}
|
||||
}
|
||||
if ($Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFix'] -gt 0) {
|
||||
$Script:Reporting['GPOOrganizationalUnit']['ActionRequired'] = $true
|
||||
} else {
|
||||
$Script:Reporting['GPOOrganizationalUnit']['ActionRequired'] = $false
|
||||
}
|
||||
}
|
||||
Variables = @{
|
||||
TotalOU = 0
|
||||
UnlinkGPO = 0
|
||||
UnlinkGPOEmpty = 0
|
||||
DeleteOU = 0
|
||||
Legitimate = 0
|
||||
Excluded = 0
|
||||
ExcludedOU = [System.Collections.Generic.List[string]]::new()
|
||||
WillFix = 0
|
||||
WillFixPerDomain = $null
|
||||
}
|
||||
Overview = {
|
||||
|
||||
}
|
||||
Summary = {
|
||||
New-HTMLText -FontSize 10pt -Text @(
|
||||
"In most Active Directories there are a lot of Organizational Units that have different use cases to store different type of objects. "
|
||||
"As Active Directories change over time you can often find Organizational Units with linked GPOs and no objects inside. "
|
||||
"In some cases thats's expected, but in some cases it's totally unnessecary, and for very large AD can be a problem. "
|
||||
"Additionally only User and Computer objects can have GPO applied to them, so having GPO applied to a any other object type won't really work. "
|
||||
)
|
||||
New-HTMLText -FontSize 10pt -Text "Following can happen: " -FontWeight bold
|
||||
New-HTMLList -Type Unordered {
|
||||
New-HTMLListItem -Text 'Organizational Units that can have Group Policies unlinked (objects exists): ', $Script:Reporting['GPOOrganizationalUnit']['Variables']['UnlinkGPO'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text 'Organizational Units that can have Group Policies unlinked (no applicable objects): ', $Script:Reporting['GPOOrganizationalUnit']['Variables']['UnlinkGPOEmpty'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text "Organizational Units that can be deleted (no objects/no gpos) - ", "optional", ": ", $Script:Reporting['GPOOrganizationalUnit']['Variables']['DeleteOU'] -FontWeight normal, bold, normal, bold -Color None, red, None, None
|
||||
} -FontSize 10pt
|
||||
New-HTMLText -Text 'Following domains require actions (permissions required):' -FontSize 10pt -FontWeight bold
|
||||
New-HTMLList -Type Unordered {
|
||||
foreach ($Domain in $Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFixPerDomain'].Keys) {
|
||||
New-HTMLListItem -Text "$Domain requires ", $Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFixPerDomain'][$Domain], " changes." -FontWeight normal, bold, normal
|
||||
}
|
||||
} -FontSize 10pt
|
||||
|
||||
if ($Script:Reporting['GPOOrganizationalUnit']['Variables']['ExcludedOU'].Count -gt 0) {
|
||||
New-HTMLText -Text @(
|
||||
'There are ',
|
||||
$Script:Reporting['GPOOrganizationalUnit']['Variables']['ExcludedOU'].Count,
|
||||
" Organizational Units that are excluded.",
|
||||
" Please make sure to exclude those when executing unlinking/removal procedures. "
|
||||
) -FontSize 10pt -FontWeight normal, bold, normal, bold -Color None, Red, None, Red
|
||||
<#
|
||||
New-HTMLList -Type Unordered {
|
||||
foreach ($OU in $Script:Reporting['GPOOrganizationalUnit']['Variables']['ExcludedOU']) {
|
||||
New-HTMLListItem -Text $OU -FontWeight normal, bold, normal
|
||||
}
|
||||
} -FontSize 10pt
|
||||
#>
|
||||
}
|
||||
|
||||
New-HTMLText -Text @(
|
||||
"Please make sure that you really want to unlink GPO or delete Organizational Unit before executing changes. Sometimes it's completly valid to keep one or the other. "
|
||||
"Unlinking GPO from OU that has no Computer or User objects is fairly safe exercise. Removing OU requires a bit more dive in, and should only be executed if you know what you're doing. "
|
||||
) -FontWeight normal, bold -Color None, Red -FontSize 10pt
|
||||
|
||||
if ($Script:Reporting['GPOOrganizationalUnit']['Exclusions']) {
|
||||
New-HTMLText -LineBreak
|
||||
New-HTMLText -Text @(
|
||||
"While preparing this report following exclusions were defined. "
|
||||
"Please make sure that when you execute your steps to include those exclusions to prevent any issues. "
|
||||
) -FontSize 10pt -FontWeight bold, normal -Color Red, None -LineBreak
|
||||
|
||||
New-HTMLText -Text "Code to use for exclusions: " -FontSize 10pt -FontWeight bold -LineBreak
|
||||
|
||||
$Code = New-GPOZaurrExclusions -ExclusionsArray $Script:Reporting['GPOOrganizationalUnit']['Exclusions']
|
||||
|
||||
if ($Code) {
|
||||
New-HTMLCodeBlock -Code $Code -Style powershell
|
||||
}
|
||||
}
|
||||
}
|
||||
Solution = {
|
||||
New-HTMLSection -Invisible {
|
||||
New-HTMLPanel {
|
||||
& $Script:GPOConfiguration['GPOOrganizationalUnit']['Summary']
|
||||
}
|
||||
New-HTMLPanel {
|
||||
New-HTMLChart {
|
||||
New-ChartBarOptions -Type bar -Distributed
|
||||
New-ChartAxisY -LabelMaxWidth 200 -LabelAlign left -Show
|
||||
New-ChartBar -Name "Unlink GPO ($($Script:Reporting['GPOOrganizationalUnit']['Variables']['UnlinkGPO']))" -Value $Script:Reporting['GPOOrganizationalUnit']['Variables']['UnlinkGPO']
|
||||
New-ChartBar -Name "Unlink GPO Delete OU ($($Script:Reporting['GPOOrganizationalUnit']['Variables']['UnlinkGPOEmpty']))" -Value $Script:Reporting['GPOOrganizationalUnit']['Variables']['UnlinkGPOEmpty']
|
||||
New-ChartBar -Name "Delete OU ($($Script:Reporting['GPOOrganizationalUnit']['Variables']['DeleteOU']))" -Value $Script:Reporting['GPOOrganizationalUnit']['Variables']['DeleteOU']
|
||||
} -Title 'Organizational Units' -TitleAlignment center
|
||||
}
|
||||
}
|
||||
New-HTMLSection -Name 'Group Policy Organizational Units' {
|
||||
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
|
||||
New-HTMLTableCondition -Name 'Status' -ComparisonType string -Value 'Unlink GPO' -BackgroundColor YellowOrange -Row
|
||||
New-HTMLTableCondition -Name 'Status' -ComparisonType string -Value 'Delete OU' -BackgroundColor Red -Row
|
||||
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
|
||||
}
|
||||
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
|
||||
New-HTMLSection -Name 'Steps to fix Group Organizational Units' {
|
||||
New-HTMLContainer {
|
||||
New-HTMLSpanStyle -FontSize 10pt {
|
||||
#New-HTMLText -Text 'Following steps will guide you how to fix group policy owners'
|
||||
New-HTMLWizard {
|
||||
New-HTMLWizardStep -Name 'Prepare environment' {
|
||||
New-HTMLText -Text "To be able to execute actions in automated way please install required modules. Those modules will be installed straight from Microsoft PowerShell Gallery."
|
||||
New-HTMLCodeBlock -Code {
|
||||
Install-Module GPOZaurr -Force
|
||||
Import-Module GPOZaurr -Force
|
||||
} -Style powershell
|
||||
New-HTMLText -Text "Using force makes sure newest version is downloaded from PowerShellGallery regardless of what is currently installed. Once installed you're ready for next step."
|
||||
}
|
||||
if ($Script:Reporting['GPOOrganizationalUnit']['Exclusions']) {
|
||||
New-HTMLWizardStep -Name 'Required exclusions' {
|
||||
New-HTMLText -Text @(
|
||||
"While preparing this report following exclusions were defined. "
|
||||
"Please make sure that when you execute your steps to include those exclusions to prevent any issues. "
|
||||
)
|
||||
$Code = New-GPOZaurrExclusions -ExclusionsArray $Script:Reporting['GPOOrganizationalUnit']['Exclusions']
|
||||
|
||||
if ($Code) {
|
||||
New-HTMLCodeBlock -Code $Code -Style powershell
|
||||
}
|
||||
}
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Prepare report' {
|
||||
New-HTMLText -Text "Depending when this report was run you may want to prepare new report before proceeding with unlinking unused Group Policies. To generate new report please use:"
|
||||
New-HTMLCodeBlock -Code {
|
||||
Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrGPOOrganizationalUnitBefore.html -Verbose -Type GPOOrganizationalUnit
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"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."
|
||||
}
|
||||
New-HTMLText -Text "Alternatively if you prefer working with console you can run: "
|
||||
New-HTMLCodeBlock -Code {
|
||||
$OwnersGPO = Get-GPOZaurrOrganizationalUnit -Verbose
|
||||
$OwnersGPO | Format-Table
|
||||
}
|
||||
New-HTMLText -Text "It provides same data as you see in table above just doesn't prettify it for you."
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Unlink unused Group Policies' {
|
||||
New-HTMLText -Text @(
|
||||
"Following command when executed runs cleanup procedure that unlinks all Group Policies from Organizational Units that have no user or computer objects. "
|
||||
"Make sure when running it for the first time to run it with ",
|
||||
"WhatIf",
|
||||
" parameter as shown below to prevent accidental unlinking."
|
||||
'When run it will remove any GPO links from Organizational Units that have no objects applicable for GPOs.'
|
||||
) -FontWeight normal, normal, bold, normal -Color Black, Black, Red, Black
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurrLinkEmptyOU -WhatIf -Verbose
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: "
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurrLinkEmptyOU -WhatIf -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"After execution please make sure there are no errors, make sure to review provided output, and confirm that what is about to be removed matches expected data. "
|
||||
"Keep in mind that there is no backup for this, and if link is removed you would need to relink it yourself."
|
||||
"Once you remove it, it's gone. "
|
||||
} -LineBreak
|
||||
New-HTMLText -Text 'Once happy with results please follow with command (this will start removal process): ' -LineBreak -FontWeight bold
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurrLinkEmptyOU -WhatIf -LimitProcessing 2 -Verbose
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"Alternatively for multi-domain scenario, if you have limited Domain Admin credentials to a single domain please use following command: "
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Remove-GPOZaurrLinkEmptyOU -WhatIf -LimitProcessing 2 -Verbose -IncludeDomains 'YourDomainYouHavePermissionsFor'
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"This command when executed deletes only first X broken GPOs. Use LimitProcessing parameter to prevent mass delete and increase the counter when no errors occur. "
|
||||
"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. "
|
||||
} -LineBreak
|
||||
New-HTMLText -TextBlock {
|
||||
"It's possible to exclude certain OU's from having GPO's unlinked using follwing method: "
|
||||
} -FontWeight bold
|
||||
New-HTMLCodeBlock -Code {
|
||||
$Exclude = @(
|
||||
"OU=Groups,OU=Production,DC=ad,DC=evotec,DC=pl"
|
||||
"OU=Test \, OU,OU=ITR02,DC=ad,DC=evotec,DC=xyz"
|
||||
)
|
||||
Remove-GPOZaurrLinkEmptyOU -Verbose -LimitProcessing 3 -WhatIf -ExcludeOrganizationalUnit $Exclude
|
||||
}
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Delete unused Organizational Units' {
|
||||
New-HTMLText -Text @(
|
||||
"Following automation is not yet implemented. Requires more testing as potentially it could do more damage than help."
|
||||
)
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Verification report' {
|
||||
New-HTMLText -TextBlock {
|
||||
"Once cleanup task was executed properly, we need to verify that report now shows no problems."
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrGPOOrganizationalUnitAfter.html -Verbose -Type GPOOrganizationalUnit
|
||||
}
|
||||
New-HTMLText -Text "If everything is healthy in the report you're done! Enjoy rest of the day!" -Color BlueDiamond
|
||||
}
|
||||
} -RemoveDoneStepOnNavigateBack -Theme arrows -ToolbarButtonPosition center -EnableAllAnchors
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($Script:Reporting['GPOOrganizationalUnit']['WarningsAndErrors']) {
|
||||
New-HTMLSection -Name 'Warnings & Errors to Review' {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@
|
||||
New-HTMLListItem -Text 'Group Policies on SYSVOL, but no details in AD: ', $Script:Reporting['GPOBroken']['Variables']['NotAvailableInAD'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text 'Group Policies in AD, but no content on SYSVOL: ', $Script:Reporting['GPOBroken']['Variables']['NotAvailableOnSysvol'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text 'Group Policies which exists, but have wrong ObjectClass: ', $Script:Reporting['GPOBroken']['Variables']['NotAvailableObjectClassIssue'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text "Group Policies which couldn't be assed due to permissions issue: ", $Script:Reporting['GPOBroken']['Variables']['NotAvailablePermissionIssue'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text "Group Policies which couldn't be assessed due to permissions issue: ", $Script:Reporting['GPOBroken']['Variables']['NotAvailablePermissionIssue'] -FontWeight normal, bold
|
||||
} -FontSize 10pt
|
||||
New-HTMLText -Text 'Following domains require actions (permissions required):' -FontSize 10pt -FontWeight bold
|
||||
New-HTMLList -Type Unordered {
|
||||
@@ -146,7 +146,7 @@
|
||||
New-HTMLWizardStep -Name 'Prepare report' {
|
||||
New-HTMLText -Text "Depending when this report was run you may want to prepare new report before proceeding with removal. To generate new report please use:"
|
||||
New-HTMLCodeBlock -Code {
|
||||
Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrBrokenGpoBefore.html -Verbose -Type GPOOrphans
|
||||
Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrBrokenGpoBefore.html -Verbose -Type GPOBroken
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"When executed it will take a while to generate all data and provide you with new report depending on size of environment."
|
||||
@@ -299,7 +299,7 @@
|
||||
"Once cleanup task was executed properly, we need to verify that report now shows no problems."
|
||||
}
|
||||
New-HTMLCodeBlock -Code {
|
||||
Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrBrokenGpoAfter.html -Verbose -Type GPOOrphans
|
||||
Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrBrokenGpoAfter.html -Verbose -Type GPOBroken
|
||||
}
|
||||
New-HTMLText -Text "If everything is healthy in the report you're done! Enjoy rest of the day!" -Color BlueDiamond
|
||||
}
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
ActionRequired = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
Get-GPOZaurrOwner -IncludeSysvol -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains
|
||||
if ($Script:Reporting['GPOOwners']['Exclusions']) {
|
||||
Get-GPOZaurrOwner -IncludeSysvol -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ApprovedOwner $Script:Reporting['GPOOwners']['Exclusions']
|
||||
} else {
|
||||
Get-GPOZaurrOwner -IncludeSysvol -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains
|
||||
}
|
||||
}
|
||||
Processing = {
|
||||
# Create Per Domain Variables
|
||||
@@ -19,17 +23,35 @@
|
||||
$Script:Reporting['GPOOwners']['Variables']['WillFixPerDomain'][$GPO.DomainName] = 0
|
||||
}
|
||||
# Checks
|
||||
if ($GPO.IsOwnerConsistent) {
|
||||
if ($GPO.Status -contains 'Consistent') {
|
||||
$Script:Reporting['GPOOwners']['Variables']['IsConsistent']++
|
||||
} else {
|
||||
} elseif ($GPO.Status -contains 'Inconsistent') {
|
||||
$Script:Reporting['GPOOwners']['Variables']['IsNotConsistent']++
|
||||
}
|
||||
if ($GPO.IsOwnerAdministrative) {
|
||||
if ($GPO.Status -contains 'Administrative') {
|
||||
$Script:Reporting['GPOOwners']['Variables']['IsAdministrative']++
|
||||
} elseif ($GPO.Status -contains 'Approved') {
|
||||
$Script:Reporting['GPOOwners']['Variables']['IsApproved']++
|
||||
} else {
|
||||
$Script:Reporting['GPOOwners']['Variables']['IsNotAdministrative']++
|
||||
}
|
||||
if (($GPO.IsOwnerAdministrative -eq $false -or $GPO.IsOwnerConsistent -eq $false) -and $GPO.SysvolExists -eq $true) {
|
||||
|
||||
if ($GPO.SysvolExists -eq $false) {
|
||||
$Script:Reporting['GPOOwners']['Variables']['RequiresDiffFix']++
|
||||
$Script:Reporting['GPOOwners']['Variables']['RequiresDiffFixPerDomain'][$GPO.DomainName]++
|
||||
} else {
|
||||
if ($GPO.Status -contains 'Inconsistent') {
|
||||
$Script:Reporting['GPOOwners']['Variables']['WillFix']++
|
||||
$Script:Reporting['GPOOwners']['Variables']['WillFixPerDomain'][$GPO.DomainName]++
|
||||
} elseif ($GPO.Status -contains 'NotAdministrative' -and $GPO.Status -notcontains 'Approved') {
|
||||
$Script:Reporting['GPOOwners']['Variables']['WillFix']++
|
||||
$Script:Reporting['GPOOwners']['Variables']['WillFixPerDomain'][$GPO.DomainName]++
|
||||
} else {
|
||||
$Script:Reporting['GPOOwners']['Variables']['WillNotTouch']++
|
||||
}
|
||||
}
|
||||
<#
|
||||
if (($GPO.IsOwnerAdministrative -eq $false -or $GPO.IsOwnerConsistent -eq $false) -and $GPO.Status -and $GPO.SysvolExists -eq $true) {
|
||||
$Script:Reporting['GPOOwners']['Variables']['WillFix']++
|
||||
$Script:Reporting['GPOOwners']['Variables']['WillFixPerDomain'][$GPO.DomainName]++
|
||||
} elseif ($GPO.SysvolExists -eq $false) {
|
||||
@@ -38,6 +60,7 @@
|
||||
} else {
|
||||
$Script:Reporting['GPOOwners']['Variables']['WillNotTouch']++
|
||||
}
|
||||
#>
|
||||
}
|
||||
if ($Script:Reporting['GPOOwners']['Variables']['WillFix'] -gt 0) {
|
||||
$Script:Reporting['GPOOwners']['ActionRequired'] = $true
|
||||
@@ -47,6 +70,7 @@
|
||||
}
|
||||
Variables = @{
|
||||
IsAdministrative = 0
|
||||
IsApproved = 0
|
||||
IsNotAdministrative = 0
|
||||
IsConsistent = 0
|
||||
IsNotConsistent = 0
|
||||
@@ -77,21 +101,23 @@
|
||||
#>
|
||||
}
|
||||
Summary = {
|
||||
New-HTMLText -FontSize 10pt -TextBlock {
|
||||
"By default GPO creation is usually maintained by Domain Admins or Enterprise Admins. "
|
||||
"When GPO is created by member of Domain Admins or Enterprise Admins group the GPO Owner is set to Domain Admins. "
|
||||
"When GPO is created by member of Group Policy Creator Owners or other group has delegated rights to create a GPO the owner of said GPO is not Domain Admins group but is assigned to relevant user. "
|
||||
"GPO Owners should be Domain Admins or Enterprise Admins to prevent abuse. If that isn't so it means owner is able to fully control GPO and potentially change it's settings in uncontrolled way. "
|
||||
"While at the moment of creation of new GPO it's not a problem, in long term it's possible such person may no longer be admin, yet keep their rights over GPO. "
|
||||
}
|
||||
New-HTMLText -FontSize 10pt -TextBlock {
|
||||
"As you're aware Group Policies are stored in 2 places. In Active Directory (metadata) and SYSVOL (settings). This means that there are 2 places where GPO Owners exists. "
|
||||
"This also means that for multiple reasons AD and SYSVOL can be out of sync when it comes to their permissions which can lead to uncontrolled ability to modify them. "
|
||||
"Ownership in Active Directory and Ownership of SYSVOL for said GPO are required to be the same. "
|
||||
}
|
||||
New-HTMLText -FontSize 10pt -Text @(
|
||||
"By default, GPO creation is usually maintained by Domain Admins or Enterprise Admins. "
|
||||
"When GPO is created by Domain Admins or Enterprise Admins group members, the GPO Owner is set to Domain Admins. "
|
||||
"When GPO is created by a member of Group Policy Creator Owners or other group has delegated rights to create a GPO, "
|
||||
"the owner of said GPO is not Domain Admins group but is assigned to the relevant user. "
|
||||
"GPO Owners should be Domain Admins or Enterprise Admins to prevent abuse. "
|
||||
"If that isn't so, it means the owner can fully control GPO and potentially change its settings in an uncontrolled way. "
|
||||
"While at the moment of creation of new GPO, it's not a problem, in the long term, it's possible such a person may no longer be admin, yet keep their rights over GPO. "
|
||||
"As your aware, Group Policies are stored in 2 places. In Active Directory (metadata) and SYSVOL (settings). "
|
||||
"This means that there are 2 places where GPO Owners exists. "
|
||||
"This also means that for multiple reasons, AD and SYSVOL can be out of sync when it comes to their permissions, which can lead to uncontrolled ability to modify them. "
|
||||
"Ownership in Active Directory and Ownership of SYSVOL for said GPO is required to be the same."
|
||||
)
|
||||
New-HTMLText -Text "Here's a short summary of ", "Group Policy Owners", ": " -FontSize 10pt -FontWeight normal, bold, normal
|
||||
New-HTMLList -Type Unordered {
|
||||
New-HTMLListItem -Text 'Administrative Owners: ', $Script:Reporting['GPOOwners']['Variables']['IsAdministrative'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text 'Non-Administrative, but approved Owners (for example AGPM): ', $Script:Reporting['GPOOwners']['Variables']['IsApproved'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text 'Non-Administrative Owners: ', $Script:Reporting['GPOOwners']['Variables']['IsNotAdministrative'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text "Owners consistent in AD and SYSVOL: ", $Script:Reporting['GPOOwners']['Variables']['IsConsistent'] -FontWeight normal, bold
|
||||
New-HTMLListItem -Text "Owners not-consistent in AD and SYSVOL: ", $Script:Reporting['GPOOwners']['Variables']['IsNotConsistent'] -FontWeight normal, bold
|
||||
@@ -114,6 +140,22 @@
|
||||
New-HTMLListItem -Text "$Domain requires ", $Script:Reporting['GPOOwners']['Variables']['RequiresDiffFixPerDomain'][$Domain], " changes." -FontWeight normal, bold, normal
|
||||
}
|
||||
} -FontSize 10pt
|
||||
|
||||
if ($Script:Reporting['GPOOwners']['Exclusions']) {
|
||||
New-HTMLText -LineBreak
|
||||
New-HTMLText -Text @(
|
||||
"While preparing this report following exclusions were defined. "
|
||||
"Please make sure that when you execute your steps to include those exclusions to prevent any issues. "
|
||||
) -FontSize 10pt -FontWeight bold, normal -Color Red, None -LineBreak
|
||||
|
||||
New-HTMLText -Text "Code to use for exclusions: " -FontSize 10pt -FontWeight bold -LineBreak
|
||||
|
||||
$Code = New-GPOZaurrExclusions -ExclusionsArray $Script:Reporting['GPOOwners']['Exclusions']
|
||||
|
||||
if ($Code) {
|
||||
New-HTMLCodeBlock -Code $Code -Style powershell
|
||||
}
|
||||
}
|
||||
}
|
||||
Solution = {
|
||||
New-HTMLSection -Invisible {
|
||||
@@ -123,16 +165,25 @@
|
||||
New-HTMLPanel {
|
||||
New-HTMLChart {
|
||||
New-ChartBarOptions -Type barStacked
|
||||
New-ChartLegend -Name 'Yes', 'No' -Color LightGreen, Salmon
|
||||
New-ChartBar -Name 'Is administrative' -Value $Script:Reporting['GPOOwners']['Variables']['IsAdministrative'], $Script:Reporting['GPOOwners']['Variables']['IsNotAdministrative']
|
||||
New-ChartLegend -Name 'Yes', 'No', 'Approved' -Color LightGreen, Salmon, DeepSkyBlue
|
||||
New-ChartBar -Name 'Is administrative' -Value $Script:Reporting['GPOOwners']['Variables']['IsAdministrative'], $Script:Reporting['GPOOwners']['Variables']['IsNotAdministrative'], $Script:Reporting['GPOOwners']['Variables']['IsApproved']
|
||||
New-ChartBar -Name 'Is consistent' -Value $Script:Reporting['GPOOwners']['Variables']['IsConsistent'], $Script:Reporting['GPOOwners']['Variables']['IsNotConsistent']
|
||||
} -Title 'Group Policy Owners' -TitleAlignment center
|
||||
}
|
||||
}
|
||||
New-HTMLSection -Name 'Group Policy Owners' {
|
||||
New-HTMLTable -DataTable $Script:Reporting['GPOOwners']['Data'] -Filtering {
|
||||
New-HTMLTableCondition -Name 'IsOwnerConsistent' -Value $false -BackgroundColor Salmon -ComparisonType string -Row
|
||||
New-HTMLTableCondition -Name 'IsOwnerAdministrative' -Value $false -BackgroundColor Salmon -ComparisonType string -Row
|
||||
#New-HTMLTableCondition -Name 'IsOwnerConsistent' -Value $false -BackgroundColor Salmon -ComparisonType string -Row
|
||||
#New-HTMLTableCondition -Name 'IsOwnerAdministrative' -Value $false -BackgroundColor Salmon -ComparisonType string -Row
|
||||
|
||||
New-HTMLTableCondition -Name 'Status' -Value 'Administrative, Consistent' -BackgroundColor LightGreen -ComparisonType string -Row
|
||||
New-HTMLTableCondition -Name 'Status' -Value 'NotAdministrative, Consistent, Approved' -BackgroundColor DeepSkyBlue -ComparisonType string -Row
|
||||
|
||||
New-HTMLTableCondition -Name 'Status' -Value 'Administrative, Inconsistent' -BackgroundColor Salmon -ComparisonType string -Row
|
||||
New-HTMLTableCondition -Name 'Status' -Value 'NotAdministrative, Inconsistent' -BackgroundColor Salmon -ComparisonType string -Row
|
||||
#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
|
||||
}
|
||||
if ($Script:Reporting['Settings']['HideSteps'] -eq $false) {
|
||||
@@ -149,6 +200,19 @@
|
||||
} -Style powershell
|
||||
New-HTMLText -Text "Using force makes sure newest version is downloaded from PowerShellGallery regardless of what is currently installed. Once installed you're ready for next step."
|
||||
}
|
||||
if ($Script:Reporting['GPOOwners']['Exclusions']) {
|
||||
New-HTMLWizardStep -Name 'Required exclusions' {
|
||||
New-HTMLText -Text @(
|
||||
"While preparing this report following exclusions were defined. "
|
||||
"Please make sure that when you execute your steps to include those exclusions to prevent any issues. "
|
||||
)
|
||||
$Code = New-GPOZaurrExclusions -ExclusionsArray $Script:Reporting['GPOOwners']['Exclusions']
|
||||
|
||||
if ($Code) {
|
||||
New-HTMLCodeBlock -Code $Code -Style powershell
|
||||
}
|
||||
}
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Prepare report' {
|
||||
New-HTMLText -Text "Depending when this report was run you may want to prepare new report before proceeding with fixing Group Policy Owners. To generate new report please use:"
|
||||
New-HTMLCodeBlock -Code {
|
||||
@@ -206,6 +270,22 @@
|
||||
New-HTMLText -TextBlock {
|
||||
"This command when executed sets new owner only on first X non-compliant GPO Owners for AD/SYSVOL. Use LimitProcessing parameter to prevent mass change and increase the counter when no errors occur. "
|
||||
"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. "
|
||||
} -LineBreak
|
||||
New-HTMLText -TextBlock {
|
||||
"It's possible to define certain owners as being approved (for example with domain that have AGPM). "
|
||||
"Make sure to verify if excluded/approved owners were provided in Required Exclusions tab, or add your own when nessecary. "
|
||||
"You can approve owners with following code: "
|
||||
} -FontWeight bold
|
||||
New-HTMLCodeBlock -Code {
|
||||
$Approved = @(
|
||||
'EVOTEC\przemyslaw.klys'
|
||||
'EVOTEC\green.b'
|
||||
)
|
||||
Set-GPOZaurrOwner -Type All -Verbose -LimitProcessing 2 -ApprovedOwner $Approved
|
||||
}
|
||||
New-HTMLText -TextBlock {
|
||||
"Please keep in mind that ApprovedOwner is only applicable to Non-Administrative permissions to provide a way to approve special use cases. "
|
||||
"It won't do anything for inconsistent, unknown permissions as those are still treated as wrong. "
|
||||
}
|
||||
}
|
||||
New-HTMLWizardStep -Name 'Verification report' {
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
$GPOZaurrPermissions = [ordered] @{
|
||||
Name = 'Group Policy Permissions'
|
||||
Enabled = $true
|
||||
Action = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
Get-GPOZaurrPermission -Type All -IncludePermissionType GpoEditDeleteModifySecurity, GpoEdit, GpoCustom -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains
|
||||
}
|
||||
Processing = {
|
||||
|
||||
}
|
||||
Variables = @{
|
||||
|
||||
}
|
||||
Overview = {
|
||||
|
||||
}
|
||||
Solution = {
|
||||
New-HTMLTable -DataTable $Script:Reporting['GPOPermissions']['Data'] -Filtering
|
||||
if ($Script:Reporting['GPOPermissions']['WarningsAndErrors']) {
|
||||
New-HTMLSection -Name 'Warnings & Errors to Review' {
|
||||
New-HTMLTable -DataTable $Script:Reporting['GPOPermissions']['WarningsAndErrors'] -Filtering {
|
||||
New-HTMLTableCondition -Name 'Type' -Value 'Warning' -BackgroundColor SandyBrown -ComparisonType string -Row
|
||||
New-HTMLTableCondition -Name 'Type' -Value 'Error' -BackgroundColor Salmon -ComparisonType string -Row
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
$GPOZaurrPermissionsAdministrative = [ordered] @{
|
||||
Name = 'Group Policy Administrative Permissions'
|
||||
Enabled = $true
|
||||
Enabled = $false
|
||||
Action = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
|
||||
@@ -283,8 +283,8 @@
|
||||
# Just in case report is too big and the full file is not attached
|
||||
New-HTMLText -FontSize 10pt -Text "To generate up to date report please execute: " -FontWeight bold
|
||||
New-HTMLList -Type Unordered {
|
||||
New-HTMLListItem -Text 'Install-Module GPOZaurr -Force', ' or ', ' install module manually.' -FontWeight bold, normal, bold
|
||||
New-HTMLListItem -Text 'Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrGPOPermissionsBefore.html -Verbose -Type GPOPermissions' -FontWeight bold
|
||||
New-HTMLListItem -Text 'Install-Module GPOZaurr -Force', ' or ', ' install module manually.' -Color RoyalBlue, None, None
|
||||
New-HTMLListItem -Text 'Invoke-GPOZaurr -FilePath $Env:UserProfile\Desktop\GPOZaurrGPOPermissionsBefore.html -Verbose -Type GPOPermissions' -Color RoyalBlue
|
||||
} -FontSize 10pt
|
||||
New-HTMLText -FontSize 10pt -Text 'Steps above will generate above summary with more details allowing you to get up to date report and steps on how to fix it.'
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
$GPOZaurrPermissionsRead = [ordered] @{
|
||||
Name = 'Group Policy Authenticated Users Permissions'
|
||||
Enabled = $true
|
||||
Enabled = $false
|
||||
Action = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
$GPOZaurrPermissionsRoot = [ordered] @{
|
||||
Name = 'Group Policies Root Permissions'
|
||||
Enabled = $true
|
||||
Enabled = $false
|
||||
Action = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
$GPOZaurrPermissionsUnknown = [ordered] @{
|
||||
Name = 'Group Policy Unknown Permissions'
|
||||
Enabled = $true
|
||||
Enabled = $false
|
||||
Action = $null
|
||||
Data = $null
|
||||
Execute = {
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
function New-GPOZaurrExclusions {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[alias('ExcludeGroupPolicies', 'ExclusionsCode', 'ExclusionsArray')][Parameter(Position = 1)][object] $Exclusions
|
||||
)
|
||||
|
||||
if ($Exclusions) {
|
||||
if ($Exclusions -is [scriptblock]) {
|
||||
#$Script:Reporting[$T]['Exclusions'] = $Exclusions
|
||||
#$Script:Reporting[$T]['ExclusionsCode'] = $Exclusions
|
||||
[string] $Code = @(
|
||||
"`$Exclusions = {"
|
||||
" " + $Exclusions.ToString()
|
||||
"}"
|
||||
)
|
||||
$Code
|
||||
}
|
||||
if ($Exclusions -is [Array]) {
|
||||
#$Script:Reporting[$T]['Exclusions'] = $Exclusions
|
||||
#$ExclusionsArray = $Exclusions
|
||||
[string] $Code = @(
|
||||
'$Exclusions = @('
|
||||
[System.Environment]::NewLine
|
||||
foreach ($Exclusion in $Exclusions) {
|
||||
" `"$Exclusion`"" + [System.Environment]::NewLine
|
||||
}
|
||||
[System.Environment]::NewLine
|
||||
')'
|
||||
)
|
||||
$Code
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,9 @@
|
||||
param(
|
||||
[System.Collections.IDictionary] $Support,
|
||||
[string] $Path,
|
||||
[switch] $Offline,
|
||||
[switch] $Online,
|
||||
[switch] $Open
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$PSDefaultParameterValues = @{
|
||||
"New-HTMLTable:WarningAction" = 'SilentlyContinue'
|
||||
}
|
||||
@@ -194,5 +189,5 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
} -Online:(-not $Offline.IsPresent) -Open:$Open.IsPresent -FilePath $Path
|
||||
} -Online:$Online.IsPresent -Open:$Open.IsPresent -FilePath $Path
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
function New-HTMLReportAll {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[string] $FilePath,
|
||||
[switch] $Online,
|
||||
[switch] $HideHTML,
|
||||
[Array] $Type
|
||||
)
|
||||
# Standard reports as requested
|
||||
Write-Color -Text '[i]', '[HTML ] ', "Generating HTML report ($FilePath)" -Color Yellow, DarkGray, Yellow
|
||||
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
|
||||
New-HTMLTableOption -DataStore JavaScript -BoolAsString -ArrayJoinString ', ' -ArrayJoin
|
||||
|
||||
New-HTMLHeader {
|
||||
New-HTMLSection -Invisible {
|
||||
New-HTMLSection {
|
||||
New-HTMLText -Text "Report generated on $(Get-Date)" -Color Blue
|
||||
} -JustifyContent flex-start -Invisible
|
||||
New-HTMLSection {
|
||||
New-HTMLText -Text "GPOZaurr - $($Script:Reporting['Version'])" -Color Blue
|
||||
} -JustifyContent flex-end -Invisible
|
||||
}
|
||||
}
|
||||
|
||||
if ($Type.Count -eq 1) {
|
||||
foreach ($T in $Script:GPOConfiguration.Keys) {
|
||||
if ($Script:GPOConfiguration[$T].Enabled -eq $true) {
|
||||
if ($Script:GPOConfiguration[$T]['Summary']) {
|
||||
$Script:Reporting[$T]['Summary'] = Invoke-Command -ScriptBlock $Script:GPOConfiguration[$T]['Summary']
|
||||
}
|
||||
& $Script:GPOConfiguration[$T]['Solution']
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach ($T in $Script:GPOConfiguration.Keys) {
|
||||
if ($Script:GPOConfiguration[$T].Enabled -eq $true) {
|
||||
if ($Script:GPOConfiguration[$T]['Summary']) {
|
||||
$Script:Reporting[$T]['Summary'] = Invoke-Command -ScriptBlock $Script:GPOConfiguration[$T]['Summary']
|
||||
}
|
||||
New-HTMLTab -Name $Script:GPOConfiguration[$T]['Name'] {
|
||||
& $Script:GPOConfiguration[$T]['Solution']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} -Online:$Online.IsPresent -ShowHTML:(-not $HideHTML) -FilePath $FilePath
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
function New-HTMLReportWithSplit {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[string] $FilePath,
|
||||
[switch] $Online,
|
||||
[switch] $HideHTML,
|
||||
[string] $CurrentReport
|
||||
)
|
||||
|
||||
# Split reports into multiple files for easier viewing
|
||||
$DateName = $(Get-Date -f yyyy-MM-dd_HHmmss)
|
||||
$FileName = [io.path]::GetFileNameWithoutExtension($FilePath)
|
||||
$DirectoryName = [io.path]::GetDirectoryName($FilePath)
|
||||
foreach ($T in $Script:GPOConfiguration.Keys) {
|
||||
$NewFileName = $FileName + '_' + $T + "_" + $DateName + '.html'
|
||||
$FilePath = [io.path]::Combine($DirectoryName, $NewFileName)
|
||||
|
||||
# we execute only if enabled and current report not given which means there's a single report to run
|
||||
# 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-HTMLTabStyle -BorderRadius 0px -TextTransform capitalize -BackgroundColorActive SlateGrey
|
||||
New-HTMLSectionStyle -BorderRadius 0px -HeaderBackGroundColor Grey -RemoveShadow
|
||||
New-HTMLPanelStyle -BorderRadius 0px
|
||||
New-HTMLTableOption -DataStore JavaScript -BoolAsString -ArrayJoinString ', ' -ArrayJoin
|
||||
|
||||
New-HTMLHeader {
|
||||
New-HTMLSection -Invisible {
|
||||
New-HTMLSection {
|
||||
New-HTMLText -Text "Report generated on $(Get-Date)" -Color Blue
|
||||
} -JustifyContent flex-start -Invisible
|
||||
New-HTMLSection {
|
||||
New-HTMLText -Text "GPOZaurr - $($Script:Reporting['Version'])" -Color Blue
|
||||
} -JustifyContent flex-end -Invisible
|
||||
}
|
||||
}
|
||||
|
||||
# if ($Type.Count -eq 1) {
|
||||
# foreach ($T in $Script:GPOConfiguration.Keys) {
|
||||
# if ($Script:GPOConfiguration[$T].Enabled -eq $true) {
|
||||
# if ($Script:GPOConfiguration[$T]['Summary']) {
|
||||
# $Script:Reporting[$T]['Summary'] = Invoke-Command -ScriptBlock $Script:GPOConfiguration[$T]['Summary']
|
||||
# }
|
||||
# & $Script:GPOConfiguration[$T]['Solution']
|
||||
# }
|
||||
# }
|
||||
# } else {
|
||||
|
||||
if ($Script:GPOConfiguration[$T]['Summary']) {
|
||||
$Script:Reporting[$T]['Summary'] = Invoke-Command -ScriptBlock $Script:GPOConfiguration[$T]['Summary']
|
||||
}
|
||||
New-HTMLTab -Name $Script:GPOConfiguration[$T]['Name'] {
|
||||
& $Script:GPOConfiguration[$T]['Solution']
|
||||
}
|
||||
|
||||
# }
|
||||
} -Online:$Online.IsPresent -ShowHTML:(-not $HideHTML) -FilePath $FilePath
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
$Script:GPOConfiguration = [ordered] @{
|
||||
GPOBroken = $GPOZaurrOrphans
|
||||
GPOBrokenLink = $GPOZaurrBrokenLink
|
||||
GPOBrokenPartially = $GPOZaurrMissingFiles
|
||||
GPOOwners = $GPOZaurrOwners
|
||||
GPOConsistency = $GPOZaurrConsistency
|
||||
GPODuplicates = $GPOZaurrDuplicates
|
||||
GPOOrganizationalUnit = $GPOZaurrOrganizationalUnit
|
||||
GPOList = $GPOZaurrList
|
||||
GPOLinks = $GPOZaurrLinks
|
||||
GPOPassword = $GPOZaurrPassword
|
||||
@@ -12,9 +14,11 @@
|
||||
GPOPermissionsRead = $GPOZaurrPermissionsRead
|
||||
GPOPermissionsRoot = $GPOZaurrPermissionsRoot
|
||||
GPOPermissionsUnknown = $GPOZaurrPermissionsUnknown
|
||||
GPORedirect = $GPOZaurrGPORedirects
|
||||
GPOFiles = $GPOZaurrFiles
|
||||
GPOBlockedInheritance = $GPOZaurrBlockedInheritance
|
||||
GPOAnalysis = $GPOZaurrAnalysis
|
||||
GPOUpdates = $GPOZaurrGPOUpdates
|
||||
NetLogonOwners = $GPOZaurrNetLogonOwners
|
||||
NetLogonPermissions = $GPOZaurrNetLogonPermissions
|
||||
SysVolLegacyFiles = $GPOZaurrSysVolLegacyFiles
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
$Script:GPODitionary = [ordered] @{
|
||||
AccountPolicies = [ordered] @{
|
||||
AccountPolicies = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'SecuritySettings'
|
||||
@@ -14,7 +14,7 @@
|
||||
ConvertTo-XMLAccountPolicy -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
Audit = [ordered] @{
|
||||
Audit = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'SecuritySettings'
|
||||
@@ -36,7 +36,7 @@
|
||||
ConvertTo-XMLAudit -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
Autologon = [ordered] @{
|
||||
Autologon = [ordered] @{
|
||||
# We want to process this based on other report called RegistrySettings
|
||||
# This is because registry settings can be stored in Collections or nested within other registry settings
|
||||
# The original function ConvertTo-XMLRegistryAutologon was processing it in limited ordered and potentially would skip some entries.
|
||||
@@ -50,7 +50,7 @@
|
||||
ConvertTo-XMLRegistryAutologonOnReport -GPO $GPO
|
||||
}
|
||||
}
|
||||
AutoPlay = @{
|
||||
AutoPlay = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -65,7 +65,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/AutoPlay Policies*' -SingleObject
|
||||
}
|
||||
}
|
||||
Biometrics = @{
|
||||
Biometrics = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -78,7 +78,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Biometrics*'
|
||||
}
|
||||
}
|
||||
Bitlocker = @{
|
||||
Bitlocker = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -95,7 +95,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/BitLocker Drive Encryption*' -SingleObject
|
||||
}
|
||||
}
|
||||
ControlPanel = [ordered]@{
|
||||
ControlPanel = [ordered]@{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -110,7 +110,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel' -SingleObject
|
||||
}
|
||||
}
|
||||
ControlPanelAddRemove = [ordered]@{
|
||||
ControlPanelAddRemove = [ordered]@{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -125,7 +125,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel/Add or Remove Programs' -SingleObject
|
||||
}
|
||||
}
|
||||
ControlPanelDisplay = [ordered]@{
|
||||
ControlPanelDisplay = [ordered]@{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -140,7 +140,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel/Display' -SingleObject
|
||||
}
|
||||
}
|
||||
ControlPanelPersonalization = [ordered]@{
|
||||
ControlPanelPersonalization = [ordered]@{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -155,7 +155,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel/Personalization' -SingleObject
|
||||
}
|
||||
}
|
||||
ControlPanelPrinters = [ordered]@{
|
||||
ControlPanelPrinters = [ordered]@{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -170,7 +170,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel/Printers' -SingleObject
|
||||
}
|
||||
}
|
||||
ControlPanelPrograms = [ordered]@{
|
||||
ControlPanelPrograms = [ordered]@{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -185,7 +185,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel/Programs' -SingleObject
|
||||
}
|
||||
}
|
||||
ControlPanelRegional = [ordered]@{
|
||||
ControlPanelRegional = [ordered]@{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -200,7 +200,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel/Regional and Language Options' -SingleObject
|
||||
}
|
||||
}
|
||||
CredentialsDelegation = @{
|
||||
CredentialsDelegation = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -215,7 +215,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Credentials Delegation*' -SingleObject
|
||||
}
|
||||
}
|
||||
CustomInternationalSettings = [ordered]@{
|
||||
CustomInternationalSettings = [ordered]@{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -230,7 +230,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Custom International Settings*' -SingleObject
|
||||
}
|
||||
}
|
||||
Desktop = @{
|
||||
Desktop = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -245,7 +245,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Desktop*' -SingleObject
|
||||
}
|
||||
}
|
||||
DnsClient = @{
|
||||
DnsClient = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -260,7 +260,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Network/DNS Client*' -SingleObject
|
||||
}
|
||||
}
|
||||
DriveMapping = [ordered] @{
|
||||
DriveMapping = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'DriveMapSettings'
|
||||
@@ -275,7 +275,7 @@
|
||||
ConvertTo-XMLDriveMapSettings -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
EventLog = [ordered] @{
|
||||
EventLog = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'SecuritySettings'
|
||||
@@ -290,7 +290,7 @@
|
||||
ConvertTo-XMLEventLog -GPO $GPO
|
||||
}
|
||||
}
|
||||
EventForwarding = @{
|
||||
EventForwarding = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -305,7 +305,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Event Forwarding*' -SingleObject
|
||||
}
|
||||
}
|
||||
EventLogService = @{
|
||||
EventLogService = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -320,7 +320,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Event Log Service*' -SingleObject
|
||||
}
|
||||
}
|
||||
FileExplorer = @{
|
||||
FileExplorer = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -335,7 +335,22 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/File Explorer*' -SingleObject
|
||||
}
|
||||
}
|
||||
FolderRedirection = @{
|
||||
FolderRedirection = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'FolderRedirectionSettings'
|
||||
Settings = 'Folder'
|
||||
}
|
||||
)
|
||||
GPOPath = 'Windows Settings -> Folder Redirection'
|
||||
Code = {
|
||||
ConvertTo-XMLFolderRedirection -GPO $GPO
|
||||
}
|
||||
CodeSingle = {
|
||||
ConvertTo-XMLFolderRedirection -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
FolderRedirectionPolicy = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -350,7 +365,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Folder Redirection' -SingleObject
|
||||
}
|
||||
}
|
||||
FSLogix = @{
|
||||
FSLogix = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -365,7 +380,24 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'FSLogix' -SingleObject
|
||||
}
|
||||
}
|
||||
GoogleChrome = @{
|
||||
Firefox = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
Settings = 'Policy'
|
||||
}
|
||||
)
|
||||
GPOPath = @(
|
||||
'Policies -> Administrative Templates -> Mozilla -> Firefox'
|
||||
)
|
||||
Code = {
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Mozilla\Firefox*'
|
||||
}
|
||||
CodeSingle = {
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Mozilla\Firefox*' -SingleObject
|
||||
}
|
||||
}
|
||||
GoogleChrome = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -378,13 +410,13 @@
|
||||
'Policies -> Administrative Templates -> Google Chrome - Default Settings (users can override)'
|
||||
)
|
||||
Code = {
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Google Chrome', 'Google/Google Chrome', 'Google Chrome - Default Settings (users can override)'
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Google Chrome*', 'Google/Google Chrome*', 'Google Chrome - Default Settings (users can override)'
|
||||
}
|
||||
CodeSingle = {
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Google Chrome', 'Google/Google Chrome', 'Google Chrome - Default Settings (users can override)' -SingleObject
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Google Chrome*', 'Google/Google Chrome*', 'Google Chrome - Default Settings (users can override)' -SingleObject
|
||||
}
|
||||
}
|
||||
GroupPolicy = @{
|
||||
GroupPolicy = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -399,7 +431,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Group Policy*' -SingleObject
|
||||
}
|
||||
}
|
||||
InternetCommunicationManagement = @{
|
||||
InternetCommunicationManagement = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -414,7 +446,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Internet Communication Management*' -SingleObject
|
||||
}
|
||||
}
|
||||
InternetExplorer = @{
|
||||
InternetExplorer = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -429,7 +461,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Internet Explorer*', 'Composants Windows/Celle Internet Explorer' -SingleObject
|
||||
}
|
||||
}
|
||||
InternetExplorerZones = [ordered] @{
|
||||
InternetExplorerZones = [ordered] @{
|
||||
ByReports = @(
|
||||
@{
|
||||
Report = 'RegistrySettings'
|
||||
@@ -440,7 +472,7 @@
|
||||
ConvertTo-XMLRegistryInternetExplorerZones -GPO $GPO
|
||||
}
|
||||
}
|
||||
KDC = @{
|
||||
KDC = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -455,7 +487,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/KDC' -SingleObject
|
||||
}
|
||||
}
|
||||
LAPS = @{
|
||||
LAPS = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -470,7 +502,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'LAPS' -SingleObject
|
||||
}
|
||||
}
|
||||
Lithnet = @{
|
||||
Lithnet = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -486,7 +518,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Lithnet/Password Protection for Active Directory*' -SingleObject
|
||||
}
|
||||
}
|
||||
LocalUsers = [ordered] @{
|
||||
LocalUsers = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'LugsSettings'
|
||||
@@ -501,7 +533,7 @@
|
||||
ConvertTo-XMLLocalUser -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
LocalGroups = [ordered] @{
|
||||
LocalGroups = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'LugsSettings'
|
||||
@@ -516,7 +548,7 @@
|
||||
ConvertTo-XMLLocalGroups -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
Logon = @{
|
||||
Logon = @{
|
||||
Types = @(
|
||||
@{ Category = 'RegistrySettings'; Settings = 'Policy' }
|
||||
)
|
||||
@@ -528,7 +560,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Logon*' -SingleObject
|
||||
}
|
||||
}
|
||||
MicrosoftOutlook2002 = @{
|
||||
MicrosoftOutlook2002 = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -543,7 +575,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Microsoft Outlook 2002*' -SingleObject
|
||||
}
|
||||
}
|
||||
MicrosoftEdge = @{
|
||||
MicrosoftEdge = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -562,7 +594,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Microsoft Edge*', 'Windows Components/Microsoft Edge', 'Windows Components/Edge UI' -SingleObject
|
||||
}
|
||||
}
|
||||
MicrosoftOutlook2003 = @{
|
||||
MicrosoftOutlook2003 = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -580,7 +612,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Microsoft Office Outlook 2003*', 'Outlook 2003 RPC Encryption' -SingleObject
|
||||
}
|
||||
}
|
||||
MicrosoftOutlook2010 = @{
|
||||
MicrosoftOutlook2010 = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -595,7 +627,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Microsoft Outlook 2010*' -SingleObject
|
||||
}
|
||||
}
|
||||
MicrosoftOutlook2013 = @{
|
||||
MicrosoftOutlook2013 = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -610,7 +642,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Microsoft Outlook 2013*' -SingleObject
|
||||
}
|
||||
}
|
||||
MicrosoftOutlook2016 = @{
|
||||
MicrosoftOutlook2016 = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -625,7 +657,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Microsoft Outlook 2016*' -SingleObject
|
||||
}
|
||||
}
|
||||
MicrosoftManagementConsole = @{
|
||||
MicrosoftManagementConsole = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -640,7 +672,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Microsoft Management Console*' -SingleObject
|
||||
}
|
||||
}
|
||||
NetMeeting = @{
|
||||
NetMeeting = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -655,7 +687,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/NetMeeting*' -SingleObject
|
||||
}
|
||||
}
|
||||
MSSLegacy = @{
|
||||
MSSLegacy = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -670,7 +702,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'MSS (Legacy)' -SingleObject
|
||||
}
|
||||
}
|
||||
MSSecurityGuide = @{
|
||||
MSSecurityGuide = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -685,7 +717,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'MS Security Guide' -SingleObject
|
||||
}
|
||||
}
|
||||
OneDrive = @{
|
||||
OneDrive = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -700,7 +732,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/OneDrive*' -SingleObject
|
||||
}
|
||||
}
|
||||
Policies = @{
|
||||
Policies = @{
|
||||
Comment = "This isn't really translated"
|
||||
Types = @(
|
||||
@{
|
||||
@@ -716,7 +748,7 @@
|
||||
ConvertTo-XMLPolicies -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
Printers = @{
|
||||
Printers = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'PrintersSettings'
|
||||
@@ -735,7 +767,7 @@
|
||||
ConvertTo-XMLPrinter -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
PrintersPolicies = @{
|
||||
PrintersPolicies = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -753,7 +785,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Printers*', 'Control Panel/Printers*' -SingleObject
|
||||
}
|
||||
}
|
||||
PublicKeyPoliciesCertificates = [ordered] @{
|
||||
PublicKeyPoliciesCertificates = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'PublicKeySettings'
|
||||
@@ -774,10 +806,10 @@
|
||||
)
|
||||
GPOPath = 'Policies -> Windows Settings -> Security Settings -> Public Key Policies'
|
||||
Code = {
|
||||
ConvertTo-XMLGenericPublicKey -GPO $GPO
|
||||
ConvertTo-XMLCertificates -GPO $GPO
|
||||
}
|
||||
CodeSingle = {
|
||||
ConvertTo-XMLGenericPublicKey -GPO $GPO -SingleObject
|
||||
ConvertTo-XMLCertificates -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
<#
|
||||
@@ -805,7 +837,7 @@
|
||||
}
|
||||
}
|
||||
#>
|
||||
PublicKeyPoliciesAutoEnrollment = [ordered] @{
|
||||
PublicKeyPoliciesAutoEnrollment = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'PublicKeySettings'
|
||||
@@ -820,7 +852,7 @@
|
||||
ConvertTo-XMLGenericPublicKey -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
PublicKeyPoliciesEFS = [ordered] @{
|
||||
PublicKeyPoliciesEFS = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'PublicKeySettings'
|
||||
@@ -835,7 +867,7 @@
|
||||
ConvertTo-XMLGenericPublicKey -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
PublicKeyPoliciesRootCA = [ordered] @{
|
||||
PublicKeyPoliciesRootCA = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'PublicKeySettings'
|
||||
@@ -850,7 +882,7 @@
|
||||
ConvertTo-XMLGenericPublicKey -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
PublicKeyPoliciesEnrollmentPolicy = @{
|
||||
PublicKeyPoliciesEnrollmentPolicy = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -867,7 +899,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Internet Communication Management*' -SingleObject
|
||||
}
|
||||
}
|
||||
RegistrySetting = [ordered] @{
|
||||
RegistrySetting = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -882,7 +914,7 @@
|
||||
ConvertTo-XMLGenericPublicKey -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
RegistrySettings = [ordered] @{
|
||||
RegistrySettings = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -897,7 +929,7 @@
|
||||
ConvertTo-XMLRegistrySettings -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
OnlineAssistance = @{
|
||||
OnlineAssistance = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -912,7 +944,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Online Assistance*' -SingleObject
|
||||
}
|
||||
}
|
||||
RemoteAssistance = @{
|
||||
RemoteAssistance = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -927,7 +959,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Remote Assistance*' -SingleObject
|
||||
}
|
||||
}
|
||||
RemoteDesktopServices = @{
|
||||
RemoteDesktopServices = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -942,7 +974,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Remote Desktop Services*' -SingleObject
|
||||
}
|
||||
}
|
||||
RSSFeeds = @{
|
||||
RSSFeeds = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -957,7 +989,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/RSS Feeds*' -SingleObject
|
||||
}
|
||||
}
|
||||
Scripts = [ordered] @{
|
||||
Scripts = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'Scripts'
|
||||
@@ -972,7 +1004,7 @@
|
||||
ConvertTo-XMLScripts -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
SecurityOptions = [ordered] @{
|
||||
SecurityOptions = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'SecuritySettings'
|
||||
@@ -987,7 +1019,7 @@
|
||||
ConvertTo-XMLSecurityOptions -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
SoftwareInstallation = [ordered] @{
|
||||
SoftwareInstallation = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'SoftwareInstallationSettings'
|
||||
@@ -1002,7 +1034,7 @@
|
||||
ConvertTo-XMLSoftwareInstallation -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
SystemServices = [ordered] @{
|
||||
SystemServices = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'SecuritySettings'
|
||||
@@ -1018,7 +1050,7 @@
|
||||
ConvertTo-XMLSystemServices -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
SystemServicesNT = [ordered] @{
|
||||
SystemServicesNT = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'ServiceSettings'
|
||||
@@ -1052,7 +1084,7 @@
|
||||
}
|
||||
}
|
||||
#>
|
||||
TaskScheduler = [ordered] @{
|
||||
TaskScheduler = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'ScheduledTasksSettings'
|
||||
@@ -1068,7 +1100,7 @@
|
||||
ConvertTo-XMLTaskScheduler -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
TaskSchedulerPolicies = @{
|
||||
TaskSchedulerPolicies = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -1101,7 +1133,7 @@
|
||||
}
|
||||
}
|
||||
#>
|
||||
UserRightsAssignment = [ordered] @{
|
||||
UserRightsAssignment = [ordered] @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'SecuritySettings'
|
||||
@@ -1116,7 +1148,7 @@
|
||||
ConvertTo-XMLUserRightsAssignment -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsDefender = @{
|
||||
WindowsDefender = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -1131,7 +1163,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Defender*' -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsDefenderExploitGuard = @{
|
||||
WindowsDefenderExploitGuard = @{
|
||||
# this needs improvements because of DropDownList
|
||||
Types = @(
|
||||
@{
|
||||
@@ -1147,7 +1179,103 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Microsoft Defender Antivirus/Microsoft Defender Exploit Guard*' -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsHelloForBusiness = @{
|
||||
# WindowsFirewall = @{
|
||||
# # Contains only one setting showing version
|
||||
# Types = @(
|
||||
# @{
|
||||
# Category = 'WindowsFirewallSettings'
|
||||
# Settings = 'GlobalSettings'
|
||||
# }
|
||||
# )
|
||||
# GPOPath = 'Policies -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security'
|
||||
# Code = {
|
||||
# ConvertTo-XMLWindowsFirewall -GPO $GPO
|
||||
# }
|
||||
# CodeSingle = {
|
||||
# ConvertTo-XMLWindowsFirewall -GPO $GPO -SingleObject
|
||||
# }
|
||||
# }
|
||||
WindowsFirewallConnectionSecurityRules = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'WindowsFirewallSettings'
|
||||
Settings = 'ConnectionSecurityRules'
|
||||
}
|
||||
)
|
||||
GPOPath = 'Policies -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security'
|
||||
Code = {
|
||||
ConvertTo-XMLWindowsFirewallSecurityRules -GPO $GPO
|
||||
}
|
||||
CodeSingle = {
|
||||
ConvertTo-XMLWindowsFirewallSecurityRules -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsFirewallConnectionSecurityAuthentication = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'WindowsFirewallSettings'
|
||||
Settings = 'Phase1AuthenticationSets'
|
||||
}
|
||||
@{
|
||||
Category = 'WindowsFirewallSettings'
|
||||
Settings = 'Phase2AuthenticationSets'
|
||||
}
|
||||
#@{
|
||||
# Category = 'WindowsFirewallSettings'
|
||||
# Settings = 'DefaultPhase1CryptoSet'
|
||||
#}
|
||||
)
|
||||
GPOPath = 'Policies -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security'
|
||||
Code = {
|
||||
ConvertTo-XMLWindowsFirewallConnectionSecurityAuthentiation -GPO $GPO
|
||||
}
|
||||
CodeSingle = {
|
||||
ConvertTo-XMLWindowsFirewallConnectionSecurityAuthentiation -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsFirewallProfiles = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'WindowsFirewallSettings'
|
||||
Settings = 'DomainProfile'
|
||||
}
|
||||
@{
|
||||
Category = 'WindowsFirewallSettings'
|
||||
Settings = 'PublicProfile'
|
||||
}
|
||||
@{
|
||||
Category = 'WindowsFirewallSettings'
|
||||
Settings = 'PrivateProfile'
|
||||
}
|
||||
)
|
||||
GPOPath = 'Policies -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security'
|
||||
Code = {
|
||||
ConvertTo-XMLWindowsFirewallProfile -GPO $GPO
|
||||
}
|
||||
CodeSingle = {
|
||||
ConvertTo-XMLWindowsFirewallProfile -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsFirewallRules = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'WindowsFirewallSettings'
|
||||
Settings = 'InboundFirewallRules'
|
||||
}
|
||||
@{
|
||||
Category = 'WindowsFirewallSettings'
|
||||
Settings = 'OutboundFirewallRules'
|
||||
}
|
||||
)
|
||||
GPOPath = 'Policies -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security -> '
|
||||
Code = {
|
||||
ConvertTo-XMLWindowsFirewallRules -GPO $GPO
|
||||
}
|
||||
CodeSingle = {
|
||||
ConvertTo-XMLWindowsFirewallRules -GPO $GPO -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsHelloForBusiness = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -1162,7 +1290,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Hello For Business*' -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsInstaller = @{
|
||||
WindowsInstaller = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -1177,7 +1305,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Installer*' -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsLogon = @{
|
||||
WindowsLogon = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -1192,7 +1320,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Logon Options*' -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsMediaPlayer = @{
|
||||
WindowsMediaPlayer = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -1207,7 +1335,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Media Player*' -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsMessenger = @{
|
||||
WindowsMessenger = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -1222,7 +1350,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Messenger*' -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsPowerShell = @{
|
||||
WindowsPowerShell = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -1237,7 +1365,7 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows PowerShell*' -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsRemoteManagement = @{
|
||||
WindowsRemoteManagement = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
@@ -1252,7 +1380,22 @@
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Remote Management (WinRM)*' -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsUpdate = @{
|
||||
WindowsTimeService = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
Settings = 'Policy'
|
||||
}
|
||||
)
|
||||
GPOPath = 'Policies -> Administrative Templates -> System/Windows Time Service'
|
||||
Code = {
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Windows Time Service*'
|
||||
}
|
||||
CodeSingle = {
|
||||
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Windows Time Service*' -SingleObject
|
||||
}
|
||||
}
|
||||
WindowsUpdate = @{
|
||||
Types = @(
|
||||
@{
|
||||
Category = 'RegistrySettings'
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
function Export-GPOZaurrContent {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Saves GPOs to XML or HTML files.
|
||||
|
||||
.DESCRIPTION
|
||||
Saves GPOs to XML or HTML files.
|
||||
|
||||
.PARAMETER FolderOutput
|
||||
The folder where the GPOs will be saved.
|
||||
|
||||
.PARAMETER ReportType
|
||||
The type of report to generate. Valid values are XML or HTML. Default is XML.
|
||||
|
||||
.EXAMPLE
|
||||
An example
|
||||
|
||||
.NOTES
|
||||
General notes
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory)][alias('Path')][string] $FolderOutput,
|
||||
[ValidateSet('XML', 'HTML')][string] $ReportType = 'XML'
|
||||
)
|
||||
if ($FolderOutput) {
|
||||
if (-not (Test-Path -LiteralPath $FolderOutput)) {
|
||||
$null = New-Item -Path $FolderOutput -ItemType Directory -Force
|
||||
}
|
||||
$Forest = Get-ADForest
|
||||
$Count = 0
|
||||
foreach ($Domain in $Forest.Domains) {
|
||||
$GPOs = Get-GPO -All -Domain $Domain
|
||||
foreach ($GPO in $GPOS) {
|
||||
$Count++
|
||||
Write-Verbose -Message "Export-GPOZaurr - Exporting ($Count / $($GPOs.Count)) - $($GPO.DisplayName) to $ReportType"
|
||||
$Name = "$($GPO.DomainName)_$($GPO.Id)_$($GPO.DisplayName).xml".Replace(" ", "_").Replace("|", "_")
|
||||
$FullName = [io.path]::Combine($GPOOutput, $Name)
|
||||
Get-GPOReport -Guid $GPO.Id -Domain $GPO.DomainName -ReportType $ReportType -Path $FullName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+74
-6
@@ -1,4 +1,71 @@
|
||||
function Get-GPOZaurr {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets information about all Group Policies. Similar to what Get-GPO provides by default.
|
||||
|
||||
.DESCRIPTION
|
||||
Gets information about all Group Policies. Similar to what Get-GPO provides by default.
|
||||
|
||||
.PARAMETER ExcludeGroupPolicies
|
||||
Marks the GPO as excluded from the list.
|
||||
|
||||
.PARAMETER GPOName
|
||||
Provide a GPOName to get information about a specific GPO.
|
||||
|
||||
.PARAMETER GPOGuid
|
||||
Provide a GPOGuid to get information about a specific GPO.
|
||||
|
||||
.PARAMETER Type
|
||||
Choose a specific type of GPO. Options are: 'Empty', 'Unlinked', 'Disabled', 'NoApplyPermission', 'All'. Default is All.
|
||||
|
||||
.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 GPOPath
|
||||
Define GPOPath where the XML files are located to be analyzed instead of asking Active Directory
|
||||
|
||||
.PARAMETER PermissionsOnly
|
||||
Only show permissions, by default all information is shown
|
||||
|
||||
.PARAMETER OwnerOnly
|
||||
only show owner information, by default all information is shown
|
||||
|
||||
.PARAMETER Limited
|
||||
Provide limited output without analyzing XML data
|
||||
|
||||
.PARAMETER ADAdministrativeGroups
|
||||
Ability to provide ADAdministrativeGroups from different function to speed up processing
|
||||
|
||||
.EXAMPLE
|
||||
$GPOs = Get-GPOZaurr
|
||||
$GPOs | Format-Table DisplayName, Owner, OwnerSID, OwnerType
|
||||
|
||||
.EXAMPLE
|
||||
$GPO = Get-GPOZaurr -GPOName 'ALL | Allow use of biometrics'
|
||||
$GPO | Format-List *
|
||||
|
||||
.EXAMPLE
|
||||
$GPOS = Get-GPOZaurr -ExcludeGroupPolicies {
|
||||
Skip-GroupPolicy -Name 'de14_usr_std'
|
||||
Skip-GroupPolicy -Name 'de14_usr_std' -DomaiName 'ad.evotec.xyz'
|
||||
Skip-GroupPolicy -Name 'All | Trusted Websites' #-DomaiName 'ad.evotec.xyz'
|
||||
'{D39BF08A-87BF-4662-BFA0-E56240EBD5A2}'
|
||||
'COMPUTERS | Enable Sets'
|
||||
}
|
||||
$GPOS | Format-Table -AutoSize *
|
||||
|
||||
.NOTES
|
||||
General notes
|
||||
#>
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[scriptblock] $ExcludeGroupPolicies,
|
||||
@@ -16,7 +83,6 @@
|
||||
[switch] $PermissionsOnly,
|
||||
[switch] $OwnerOnly,
|
||||
[switch] $Limited,
|
||||
[switch] $ReturnObject,
|
||||
[System.Collections.IDictionary] $ADAdministrativeGroups
|
||||
)
|
||||
Begin {
|
||||
@@ -90,7 +156,7 @@
|
||||
Write-Warning "Get-GPOZaurr - Failed to get [$($GPO.DomainName)]($Count/$($GroupPolicies.Count)) $($GPO.DisplayName) GPOReport: $($_.Exception.Message). Skipping."
|
||||
continue
|
||||
}
|
||||
Get-XMLGPO -OwnerOnly:$OwnerOnly.IsPresent -XMLContent $XMLContent -GPO $GPO -PermissionsOnly:$PermissionsOnly.IsPresent -ADAdministrativeGroups $ADAdministrativeGroups -ReturnObject:$ReturnObject.IsPresent -ExcludeGroupPolicies $ExcludeGPO -Type $Type -LinksSummaryCache $LinksSummaryCache
|
||||
Get-XMLGPO -OwnerOnly:$OwnerOnly.IsPresent -XMLContent $XMLContent -GPO $GPO -PermissionsOnly:$PermissionsOnly.IsPresent -ADAdministrativeGroups $ADAdministrativeGroups -ExcludeGroupPolicies $ExcludeGPO -Type $Type -LinksSummaryCache $LinksSummaryCache
|
||||
} else {
|
||||
$GPO
|
||||
}
|
||||
@@ -99,10 +165,12 @@
|
||||
} else {
|
||||
foreach ($Path in $GPOPath) {
|
||||
Write-Verbose "Get-GPOZaurr - Getting GPO content from XML files"
|
||||
Get-ChildItem -LiteralPath $Path -Recurse -Filter *.xml | ForEach-Object {
|
||||
$XMLContent = [XML]::new()
|
||||
$XMLContent.Load($_.FullName)
|
||||
Get-XMLGPO -OwnerOnly:$OwnerOnly.IsPresent -XMLContent $XMLContent -PermissionsOnly:$PermissionsOnly.IsPresent -ExcludeGroupPolicies $ExcludeGPO -Type $Type
|
||||
Get-ChildItem -LiteralPath $Path -Recurse -Filter *.xml -ErrorAction SilentlyContinue | ForEach-Object {
|
||||
if ($_.Name -ne 'GPOList.xml') {
|
||||
$XMLContent = [XML]::new()
|
||||
$XMLContent.Load($_.FullName)
|
||||
Get-XMLGPO -OwnerOnly:$OwnerOnly.IsPresent -XMLContent $XMLContent -PermissionsOnly:$PermissionsOnly.IsPresent -ExcludeGroupPolicies $ExcludeGPO -Type $Type
|
||||
}
|
||||
}
|
||||
Write-Verbose "Get-GPOZaurr - Finished GPO content from XML files"
|
||||
}
|
||||
|
||||
+57
-18
@@ -10,6 +10,11 @@
|
||||
[alias('ForestName')][string] $Forest,
|
||||
[string[]] $ExcludeDomains,
|
||||
[alias('Domain', 'Domains')][string[]] $IncludeDomains,
|
||||
|
||||
[DateTime] $DateFrom,
|
||||
[DateTime] $DateTo,
|
||||
[ValidateSet('PastHour', 'CurrentHour', 'PastDay', 'CurrentDay', 'PastMonth', 'CurrentMonth', 'PastQuarter', 'CurrentQuarter', 'Last14Days', 'Last21Days', 'Last30Days', 'Last7Days', 'Last3Days', 'Last1Days')][string] $DateRange,
|
||||
[ValidateSet('WhenCreated', 'WhenChanged')][string[]] $DateProperty = 'WhenCreated',
|
||||
[System.Collections.IDictionary] $ExtendedForestInformation
|
||||
)
|
||||
Begin {
|
||||
@@ -48,25 +53,59 @@
|
||||
Server = $ForestInformation['QueryServers'][$Domain]['HostName'][0]
|
||||
}
|
||||
}
|
||||
Get-ADObject @Splat -Properties DisplayName, Name, Created, Modified, gPCFileSysPath, gPCFunctionalityVersion, gPCWQLFilter, gPCMachineExtensionNames, Description, CanonicalName, DistinguishedName | ForEach-Object -Process {
|
||||
$DomainCN = ConvertFrom-DistinguishedName -DistinguishedName $_.DistinguishedName -ToDomainCN
|
||||
$GUID = $_.Name -replace '{' -replace '}'
|
||||
if (($GUID).Length -ne 36) {
|
||||
Write-Warning "Get-GPOZaurrAD - GPO GUID ($($($GUID.Replace("`n",' ')))) is incorrect. Skipping $($_.DisplayName) / Domain: $($DomainCN)"
|
||||
# allows to only get GPOs from a specific date range
|
||||
if ($PSBoundParameters.ContainsKey('DateRange')) {
|
||||
$Dates = Get-ChoosenDates -DateRange $DateRange
|
||||
$DateFrom = $($Dates.DateFrom)
|
||||
$DateTo = $($Dates.DateTo)
|
||||
|
||||
if ($DateProperty -contains 'WhenChanged' -and $DateProperty -contains 'WhenCreated') {
|
||||
$Splat['Filter'] = -join ($Splat['Filter'], ' -and ((WhenChanged -ge $DateFrom -and WhenChanged -le $DateTo) -or (WhenCreated -ge $DateFrom -and WhenCreated -le $DateTo))')
|
||||
} elseif ($DateProperty -eq 'WhenChanged' -or $DateProperty -eq 'WhenCreated') {
|
||||
$Property = $DateProperty[0]
|
||||
$Splat['Filter'] = -join ($Splat['Filter'], " -and ($Property -ge $DateFrom -and $Property -le $DateTo)")
|
||||
} else {
|
||||
$Output = [ordered]@{ }
|
||||
$Output['DisplayName'] = $_.DisplayName
|
||||
$Output['DomainName'] = $DomainCN
|
||||
$Output['Description'] = $_.Description
|
||||
$Output['GUID'] = $GUID
|
||||
$Output['Path'] = $_.gPCFileSysPath
|
||||
$Output['FunctionalityVersion'] = $_.gPCFunctionalityVersion
|
||||
$Output['Created'] = $_.Created
|
||||
$Output['Modified'] = $_.Modified
|
||||
$Output['GPOCanonicalName'] = $_.CanonicalName
|
||||
$Output['GPODomainDistinguishedName'] = ConvertFrom-DistinguishedName -DistinguishedName $_.DistinguishedName -ToDC
|
||||
$Output['GPODistinguishedName'] = $_.DistinguishedName
|
||||
[PSCustomObject] $Output
|
||||
Write-Warning -Message "Get-GPOZaurrAD - DateProperty parameter is empty. Provide name and try again."
|
||||
continue
|
||||
}
|
||||
} elseif ($PSBoundParameters.ContainsKey('DateFrom') -and $PSBoundParameters.ContainsKey('DateTo')) {
|
||||
# already set $DateFrom,DateTo
|
||||
#$Splat['Filter'] = -join ($Splat['Filter'], '-and ($DateProperty -ge $DateFrom -and $DateProperty -le $DateTo)')
|
||||
if ($DateProperty -contains 'WhenChanged' -and $DateProperty -contains 'WhenCreated') {
|
||||
$Splat['Filter'] = -join ($Splat['Filter'], ' -and ((WhenChanged -ge $DateFrom -and WhenChanged -le $DateTo) -or (WhenCreated -ge $DateFrom -and WhenCreated -le $DateTo))')
|
||||
} elseif ($DateProperty -eq 'WhenChanged' -or $DateProperty -eq 'WhenCreated') {
|
||||
$Property = $DateProperty[0]
|
||||
$Splat['Filter'] = -join ($Splat['Filter'], " -and ($Property -ge $DateFrom -and $Property -le $DateTo)")
|
||||
} else {
|
||||
Write-Warning -Message "Get-GPOZaurrAD - DateProperty parameter is empty. Provide name and try again."
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
# not needed
|
||||
}
|
||||
|
||||
Write-Verbose -Message "Get-GPOZaurrAD - Searching domain $Domain with filter $($Splat['Filter'])"
|
||||
$Objects = Get-ADObject @Splat -Properties DisplayName, Name, Created, Modified, ntSecurityDescriptor, gPCFileSysPath, gPCFunctionalityVersion, gPCWQLFilter, gPCMachineExtensionNames, Description, CanonicalName, DistinguishedName
|
||||
foreach ($Object in $Objects) {
|
||||
$DomainCN = ConvertFrom-DistinguishedName -DistinguishedName $Object.DistinguishedName -ToDomainCN
|
||||
$GUID = $Object.Name -replace '{' -replace '}'
|
||||
if (($GUID).Length -ne 36) {
|
||||
Write-Warning "Get-GPOZaurrAD - GPO GUID ($($($GUID.Replace("`n",' ')))) is incorrect. Skipping $($Object.DisplayName) / Domain: $($DomainCN)"
|
||||
} else {
|
||||
[PSCustomObject]@{
|
||||
'DisplayName' = $Object.DisplayName
|
||||
'DomainName' = $DomainCN
|
||||
'Description' = $Object.Description
|
||||
'GUID' = $GUID
|
||||
'Path' = $Object.gPCFileSysPath
|
||||
#$Output['FunctionalityVersion'] = $Object.gPCFunctionalityVersion
|
||||
'Created' = $Object.Created
|
||||
'Modified' = $Object.Modified
|
||||
'Owner' = $Object.ntSecurityDescriptor.Owner
|
||||
'GPOCanonicalName' = $Object.CanonicalName
|
||||
'GPODomainDistinguishedName' = ConvertFrom-DistinguishedName -DistinguishedName $Object.DistinguishedName -ToDC
|
||||
'GPODistinguishedName' = $Object.DistinguishedName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,49 @@
|
||||
function Get-GPOZaurrInheritance {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Short description
|
||||
|
||||
.DESCRIPTION
|
||||
Long description
|
||||
|
||||
.PARAMETER IncludeBlockedObjects
|
||||
Include OU's with blocked inheritance. Default disabled
|
||||
|
||||
.PARAMETER OnlyBlockedInheritance
|
||||
Show only OU's with blocked inheritance
|
||||
|
||||
.PARAMETER IncludeExcludedObjects
|
||||
Show excluded objets. Default disabled
|
||||
|
||||
.PARAMETER Exclusions
|
||||
Provide exclusions for OU's approved by IT. You can provide OU by canonical name or distinguishedName
|
||||
|
||||
.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
|
||||
|
||||
.EXAMPLE
|
||||
$Objects = Get-GPOZaurrInheritance -IncludeBlockedObjects -IncludeExcludedObjects -OnlyBlockedInheritance -Exclusions $ExcludedOU
|
||||
$Objects | Format-Table
|
||||
|
||||
.NOTES
|
||||
General notes
|
||||
#>
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[switch] $IncludeBlockedObjects,
|
||||
[switch] $OnlyBlockedInheritance,
|
||||
[switch] $IncludeExcludedObjects,
|
||||
[switch] $IncludeGroupPoliciesForBlockedObjects,
|
||||
[string[]] $Exclusions,
|
||||
|
||||
[alias('ForestName')][string] $Forest,
|
||||
[string[]] $ExcludeDomains,
|
||||
@@ -10,7 +51,11 @@
|
||||
[System.Collections.IDictionary] $ExtendedForestInformation
|
||||
)
|
||||
Begin {
|
||||
$ExclusionsCache = @{}
|
||||
$ForestInformation = Get-WinADForestDetails -Extended -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation
|
||||
foreach ($Exclusion in $Exclusions) {
|
||||
$ExclusionsCache[$Exclusion] = $true
|
||||
}
|
||||
}
|
||||
Process {
|
||||
foreach ($Domain in $ForestInformation.Domains) {
|
||||
@@ -19,6 +64,42 @@
|
||||
$InheritanceInformation = [Ordered] @{
|
||||
CanonicalName = $OU.canonicalName
|
||||
BlockedInheritance = if ($OU.gpOptions -eq 1) { $true } else { $false }
|
||||
Exclude = $false
|
||||
DomainName = ConvertFrom-DistinguishedName -ToDomainCN -DistinguishedName $OU.DistinguishedName
|
||||
}
|
||||
if ($InheritanceInformation.BlockedInheritance -and $IncludeGroupPoliciesForBlockedObjects.IsPresent) {
|
||||
try {
|
||||
$GPInheritance = Get-GPInheritance -Target $OU.distinguishedName -ErrorAction Stop
|
||||
} catch {
|
||||
Write-Warning -Message "Get-GPOZaurrInheritance - Can't get GPInheritance for $($OU.distinguishedName). Error: $($_.Exception.Message)"
|
||||
continue
|
||||
}
|
||||
$ActiveGroupPolicies = foreach ($GPO in $GPInheritance.InheritedGpoLinks) {
|
||||
[PSCustomObject] @{
|
||||
OrganizationalUnit = $OU.canonicalName
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.GpoDomainName
|
||||
LinkedDirectly = if ($OU.DistinguishedName -eq $GPO.Target) { $true } else { $false }
|
||||
GPOID = $GPO.GPOID
|
||||
Enabled = $GPO.Enabled
|
||||
Enforced = $GPO.Enforced
|
||||
Order = $GPO.Order
|
||||
LinkedTo = $GPO.Target
|
||||
OrganizationalUnitDN = $OU.DistinguishedName
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$ActiveGroupPolicies = $null
|
||||
}
|
||||
if ($Exclusions) {
|
||||
if ($ExclusionsCache[$OU.canonicalName]) {
|
||||
$InheritanceInformation['Exclude'] = $true
|
||||
} elseif ($ExclusionsCache[$OU.DistinguishedName]) {
|
||||
$InheritanceInformation['Exclude'] = $true
|
||||
}
|
||||
}
|
||||
if (-not $IncludeExcludedObjects -and $InheritanceInformation['Exclude']) {
|
||||
continue
|
||||
}
|
||||
if (-not $IncludeBlockedObjects) {
|
||||
if ($OnlyBlockedInheritance) {
|
||||
@@ -44,6 +125,8 @@
|
||||
$InheritanceInformation['Computers'] = $null
|
||||
}
|
||||
}
|
||||
$InheritanceInformation['DistinguishedName'] = $OU.DistinguishedName
|
||||
$InheritanceInformation['GroupPolicies'] = $ActiveGroupPolicies
|
||||
if ($OnlyBlockedInheritance) {
|
||||
if ($InheritanceInformation.BlockedInheritance -eq $true) {
|
||||
[PSCustomObject] $InheritanceInformation
|
||||
@@ -52,17 +135,7 @@
|
||||
[PSCustomObject] $InheritanceInformation
|
||||
}
|
||||
}
|
||||
$InheritanceInformation['DistinguishedName'] = $OU.DistinguishedName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
|
||||
$OrganizationalUnits = Get-ADOrganizationalUnit -Filter *
|
||||
$Output = foreach ($OU in $OrganizationalUnits) {
|
||||
Get-GPInheritance -Target $OU.DistinguishedName
|
||||
}
|
||||
$Output | Format-Table
|
||||
#>
|
||||
}
|
||||
@@ -72,9 +72,13 @@
|
||||
# That's why we use $ForestInformation.Forest.Domains instead
|
||||
foreach ($Domain in $ForestInformation.Forest.Domains) {
|
||||
Write-Verbose "Get-GPOZaurrLink - Building GPO cache for domain $Domain"
|
||||
$QueryServer = $ForestInformation['QueryServers'][$Domain]['HostName'][0]
|
||||
Get-GPO -All -DomainName $Domain -Server $QueryServer | ForEach-Object {
|
||||
$GPOCache["$Domain$($_.ID.Guid)"] = $_
|
||||
if ($ForestInformation['QueryServers'][$Domain]) {
|
||||
$QueryServer = $ForestInformation['QueryServers'][$Domain]['HostName'][0]
|
||||
Get-GPO -All -DomainName $Domain -Server $QueryServer | ForEach-Object {
|
||||
$GPOCache["$Domain$($_.ID.Guid)"] = $_
|
||||
}
|
||||
} else {
|
||||
Write-Warning -Message "Get-GPOZaurrLink - Couldn't get query server for $Domain. Skipped."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
$CacheSummaryLinks = [ordered] @{} # cache
|
||||
|
||||
# Get all links
|
||||
$Links = Get-GPOZaurrLink -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation -Linked Root, DomainControllers, Other
|
||||
$Links = Get-GPOZaurrLink -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation -Linked Root, DomainControllers, OrganizationalUnit
|
||||
foreach ($Link in $Links) {
|
||||
if (-not $CacheSummaryLinks["$($Link.DomainName)$($Link.Guid)"]) {
|
||||
$CacheSummaryLinks["$($Link.DomainName)$($Link.Guid)"] = [System.Collections.Generic.List[System.Object]]::new()
|
||||
@@ -121,13 +121,13 @@
|
||||
for ($i = 0; $i -le $HighestCount; $i++) {
|
||||
"Level$i"
|
||||
}
|
||||
'Owner'
|
||||
'GpoStatus'
|
||||
'Description'
|
||||
'CreationTime'
|
||||
'ModificationTime'
|
||||
'GPODomainDistinguishedName'
|
||||
'GPODistinguishedName'
|
||||
#'Owner'
|
||||
#'GpoStatus'
|
||||
#'Description'
|
||||
#'CreationTime'
|
||||
#'ModificationTime'
|
||||
#'GPODomainDistinguishedName'
|
||||
#'GPODistinguishedName'
|
||||
)
|
||||
$ReturnObject.MultipleLinks = $ReturnObject.MultipleLinks | Select-Object -Property $Properties
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
function Get-GPOZaurrMissingFiles {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[Parameter()][alias('ForestName')][string] $Forest,
|
||||
[Parameter()][string[]] $ExcludeDomains,
|
||||
[Parameter()][alias('Domain', 'Domains')][string[]] $IncludeDomains,
|
||||
[Parameter()][System.Collections.IDictionary] $ExtendedForestInformation,
|
||||
[Parameter()][Alias('Name')][string[]] $GPOName,
|
||||
[Parameter()][string[]] $GPOGUID,
|
||||
[switch] $BrokenOnly
|
||||
)
|
||||
Write-Verbose "Get-GPOZaurrMissingFiles - Query AD for GPOs"
|
||||
if ($GPOName -or $GPOGUID) {
|
||||
[Array] $GPOs = @(
|
||||
foreach ($Name in $GPOName) {
|
||||
Get-GPOZaurrAD -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation -GPOName $Name
|
||||
}
|
||||
foreach ($GUID in $GPOGUID) {
|
||||
Get-GPOZaurrAD -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation -GPOGuid $GUID
|
||||
}
|
||||
)
|
||||
} else {
|
||||
[Array] $GPOs = Get-GPOZaurrAD -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation
|
||||
}
|
||||
$Count = 0
|
||||
foreach ($GPO in $GPOS) {
|
||||
$Count++
|
||||
Write-Verbose -Message "Get-GPOZaurrMissingFiles - Processing ($Count / $($GPOs.Count)) - $($GPO.DisplayName)"
|
||||
#$Name = "$($GPO.DomainName)_$($GPO.Id)_$($GPO.DisplayName).xml".Replace(" ", "_").Replace("|", "_")
|
||||
|
||||
[xml] $GPOOutput = Get-GPOReport -Guid $GPO.GUID -Domain $GPO.DomainName -ReportType Xml
|
||||
[Array] $ErrorsFound = foreach ($Type in @('User', 'Computer')) {
|
||||
foreach ($Extension in $GPOOutput.GPO.$Type.ExtensionData) {
|
||||
if ($Extension.Error) {
|
||||
Write-Warning -Message "Get-GPOZaurrMissingFiles - $($GPO.DisplayName) - $($Extension.Name) - $($Extension.Error.Details)"
|
||||
[ordered] @{ Category = $Extension.Name; Error = $Extension.Error.Details }
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($BrokenOnly -and $ErrorsFound.Count -eq 0) {
|
||||
continue
|
||||
}
|
||||
[PSCustomObject] @{
|
||||
GPOName = $GPO.DisplayName
|
||||
GPOGuid = $GPO.GUID
|
||||
DomainName = $GPO.DomainName
|
||||
ErrorCount = $ErrorsFound.Count
|
||||
ErrorCategory = $ErrorsFound.Category
|
||||
ErrorDetails = $ErrorsFound.Error
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user