Compare commits

...

91 Commits

Author SHA1 Message Date
Przemyslaw Klys 863c9fabc9 Update changelog 2023-09-17 07:32:08 +02:00
Przemyslaw Klys 972b51b472 Update changelog 2023-09-17 07:31:12 +02:00
Przemyslaw Klys 060fb95064 Update example 2023-09-17 07:30:17 +02:00
Przemyslaw Klys fdfc700c6f Update example 2023-09-17 07:30:03 +02:00
Przemyslaw Klys 81eaac3fd1 Small improvements to the report #48 2023-09-16 09:42:09 +02:00
Przemyslaw Klys cf9164766e Add example for new report #48 2023-09-16 09:41:56 +02:00
Przemyslaw Klys 4de2e2a57e Submit gitignore 2023-09-16 09:38:54 +02:00
Przemyslaw Klys 663e6058e6 Rewrite configuration 2023-09-16 09:38:30 +02:00
Przemyslaw Klys f681a5586e Update changelog 2023-09-16 09:38:22 +02:00
Przemyslaw Klys 4c022bfc16 Add redirected report #48 2023-09-16 09:38:15 +02:00
Przemyslaw Klys c03f158b77 Changed pipeline into standard foreach 2023-09-16 09:37:44 +02:00
Przemyslaw Klys 4824633787 Changed pipeline foreach into foreach for better/safer results 2023-09-16 09:34:20 +02:00
Przemyslaw Klys 8dc7e5b26d Bump versions 2023-09-16 09:34:00 +02:00
Przemyslaw Klys 68ed20f3e8 Update changelog 2023-09-16 08:48:32 +02:00
Przemyslaw Klys df2bacdba7 Remove bad char 2023-09-16 08:48:26 +02:00
Przemyslaw Klys f67ade6341 Use hashtable to create PSCustomObject for GPO details
- Simplify code by using a hashtable to create PSCustomObject for GPO details in "Get-GPOZaurrAD.ps1" script.
2023-09-16 08:42:31 +02:00
Przemyslaw Klys 5855ca2a7c Detect paths #48 2023-09-15 12:05:34 +02:00
Przemyslaw Klys b5d69c8a1f Bump versions 2023-05-26 13:25:46 +02:00
Przemyslaw Klys 32dc6ac661 add cert thumbprint 2023-05-26 13:25:39 +02:00
Przemyslaw Klys 300d6f63c5 Update changelog 2023-05-26 13:09:01 +02:00
Przemyslaw Klys 1f43816804 Improve Remove-GPOZaurr LimitProcessing 2023-05-26 13:08:51 +02:00
Przemyslaw Klys 5d50536f5a Update changelog 2023-04-27 22:16:32 +02:00
Przemyslaw Klys 4da232a1be Merge branch 'master' of https://github.com/EvotecIT/GPOZaurr 2023-04-27 21:54:54 +02:00
Przemyslaw Klys fb5fa00dce Fixes space #44 2023-04-27 21:54:33 +02:00
Przemysław Kłys 970080bfad Merge pull request #43 from Absoblogginlutely/patch-1
Typo fixed
2023-04-27 15:13:12 +02:00
Andy Helsby 845c2124bd Typo fixed
Oddly enough this message was displayed on an en-us windows 2022 server so fixed the typos
2023-04-21 11:37:39 -04:00
Przemyslaw Klys 14d33aa2a6 Bump versions and dependencies 2023-03-07 18:12:19 +01:00
Przemyslaw Klys d596fd31fc Update changelog 2023-03-07 18:12:08 +01:00
Przemyslaw Klys a5cf96398c Update module builder 2023-03-07 18:12:03 +01:00
Przemyslaw Klys 68921b7fc7 Improve detections of empty OUs #39 2023-03-07 17:59:52 +01:00
Przemyslaw Klys ab8443d450 Bump module builder 2022-12-16 17:37:48 +01:00
Przemyslaw Klys 386af088ae Bump version 2022-12-16 17:36:43 +01:00
Przemyslaw Klys ad0903e4d9 Update changelog 2022-12-16 17:30:16 +01:00
Przemyslaw Klys 91ff9da014 Hopefully fixes #38 2022-12-16 17:28:30 +01:00
Przemyslaw Klys a262ba531f Hopefully fixes #37 2022-12-16 17:28:12 +01:00
Przemyslaw Klys ea7b4f1bd8 Bump version 2022-12-04 23:23:55 +01:00
Przemyslaw Klys 09cbd6ca27 Update changelog 2022-12-04 23:03:40 +01:00
Przemyslaw Klys ddd2139ebd Bump version 2022-11-07 14:15:37 +01:00
Przemyslaw Klys ca6e90f399 Bump version 2022-10-27 19:33:33 +02:00
Przemyslaw Klys 90931d5c80 Update changelog 2022-10-27 19:33:27 +02:00
Przemyslaw Klys bfd45c0604 Fixes #35 2022-10-27 19:15:49 +02:00
Przemyslaw Klys 231c2951e0 Update changelog 2022-10-20 08:47:50 +02:00
Przemyslaw Klys faea9753ae Bump versions 2022-10-20 08:45:13 +02:00
Przemyslaw Klys 4c49406a6c Update changelog 2022-10-20 08:44:58 +02:00
Przemyslaw Klys f3d73abed4 Fixes additional space #31 2022-10-20 08:43:43 +02:00
Przemyslaw Klys 620ce6cd61 Fixes #33 2022-10-20 08:36:11 +02:00
Przemyslaw Klys b336f73eda Fixes SplitReports 2022-09-12 22:16:20 +02:00
Przemyslaw Klys bfefb7f943 Update changelog 2022-09-12 22:14:39 +02:00
Przemyslaw Klys 18226c172a Bump version 2022-09-12 22:14:32 +02:00
Przemyslaw Klys 3320b26bd4 Update docs 2022-09-11 23:17:53 +02:00
Przemyslaw Klys ec91c69673 moved to a different directory 2022-09-11 23:17:46 +02:00
Przemyslaw Klys 31e9b3b4d3 Add docs for anotehr command 2022-09-11 23:17:37 +02:00
Przemyslaw Klys d7eedc97b9 Update module builder 2022-09-11 23:17:28 +02:00
Przemyslaw Klys 42d3ba67dc Update PSD1 2022-09-11 23:17:14 +02:00
Przemyslaw Klys cdc9c1cbc5 Update changelog 2022-09-11 22:34:02 +02:00
Przemyslaw Klys de28c53842 Example on new function 2022-09-11 22:32:57 +02:00
Przemyslaw Klys be0be57994 Udate changelog 2022-09-11 22:32:44 +02:00
Przemyslaw Klys 652f553e71 Update example 2022-09-11 22:32:39 +02:00
Przemyslaw Klys 5d2a4725f1 move html to separate functions
fix splitreports to start creating reports right away
2022-09-11 22:30:55 +02:00
Przemyslaw Klys 4081a5ead1 Add new function to export XMLs 2022-09-11 22:28:16 +02:00
Przemyslaw Klys 796c69de37 Update examples 2022-09-11 22:28:04 +02:00
Przemyslaw Klys 9929d827f5 Disabled tests that are deprecated 2022-07-27 12:41:07 +02:00
Przemyslaw Klys 4781b91e23 Update changelog 2022-07-27 09:39:57 +02:00
Przemyslaw Klys 1ca78cf5f5 Disable deprecated reports if user doesn't ask for them 2022-07-27 09:37:35 +02:00
Przemyslaw Klys 768e32cf7e Update module builder 2022-07-26 21:51:14 +02:00
Przemyslaw Klys 0d43c4e809 Update changelog 2022-07-26 21:49:00 +02:00
Przemyslaw Klys ac4a9bb43d Added error handling 2022-07-26 21:47:57 +02:00
Przemyslaw Klys 0abde822f5 Add split reports functionality 2022-07-26 21:40:33 +02:00
Przemyslaw Klys bf3ec81ea6 Update docs 2022-07-26 21:40:22 +02:00
Przemyslaw Klys c0d1f4de1c Update changelog 2022-07-26 21:39:54 +02:00
Przemyslaw Klys 65719b8c4c Bump version 2022-07-26 21:39:48 +02:00
Przemyslaw Klys 096e6983c6 Update 2021-12-06 09:36:45 +01:00
Przemyslaw Klys ea4ef03e4f Added additional property 2021-12-06 09:35:54 +01:00
Przemyslaw Klys 61ca7fede4 Update docs 2021-12-05 11:30:01 +01:00
Przemyslaw Klys 5cc0db1031 Update docs 2021-12-05 11:29:43 +01:00
Przemyslaw Klys d748afda1d Version bump 2021-12-05 11:28:15 +01:00
Przemyslaw Klys 9165f23f1b Update changelog 2021-12-05 11:27:49 +01:00
Przemyslaw Klys 1c700cd27c Update docs 2021-12-05 11:26:54 +01:00
Przemyslaw Klys a566d4716a Update docs 2021-12-05 11:26:47 +01:00
Przemyslaw Klys 196163cc1f Version bump 2021-12-05 11:26:39 +01:00
Przemyslaw Klys a546a023ff added docs 2021-12-05 11:26:31 +01:00
Przemyslaw Klys f5a38b4351 Updated docs 2021-12-05 11:10:38 +01:00
Przemyslaw Klys 9c668ac869 Removed dead parameter 2021-12-05 11:10:32 +01:00
Przemyslaw Klys a50dd3cc9a Update changelog 2021-12-05 11:04:06 +01:00
Przemyslaw Klys 45be7cd432 Update changelog 2021-12-05 11:02:57 +01:00
Przemyslaw Klys cab639239f Fixes #30 2021-12-05 11:01:19 +01:00
Przemyslaw Klys 5a578278d0 Updated docs 2021-12-03 22:32:16 +01:00
Przemyslaw Klys 408c4a5530 Update changelog/psd1 2021-12-03 22:22:25 +01:00
Przemyslaw Klys 40905c67ec Update docs 2021-12-03 22:21:09 +01:00
Przemyslaw Klys cf8c687e57 Version bump 2021-12-03 22:19:16 +01:00
Przemyslaw Klys 580ef74486 Updated docs 2021-12-03 22:19:02 +01:00
63 changed files with 3154 additions and 1125 deletions
+8
View File
@@ -0,0 +1,8 @@
Ignore/*
.vs/*
.vscode/*
Releases/*
ReleasesUnpacked/*
*.log
*.html
Artefacts/*
+221
View File
@@ -0,0 +1,221 @@
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' -Guid Auto -Version Latest
#New-ConfigurationModule -Type ExternalModule -Name 'Microsoft.PowerShell.Utility', 'Microsoft.PowerShell.Management','Microsoft.PowerShell.Security'
New-ConfigurationModule -Type ApprovedModule -Name 'PSWriteColor', 'Connectimo', 'PSUnifi', 'PSWebToolbox', 'PSMyPassword'
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'
'ActiveDirectory'
) -IgnoreFunctionName @(
)
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'
# 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
+61 -9
View File
@@ -1,21 +1,73 @@
# GPOZaurr Release History
## 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
- 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
- Improves `GPOUpdates` report from `Invoke-GPOZaurr` by fixing conditional formatting
## 0.0.144 - 2021.10.24
- Improves `Get-GPOZaurrUpdates`
- Improves `Get-GPOZaurrUpdates`
- Adds `GPOUpdates` report to `Invoke-GPOZaurr`
## 0.0.143 - 2021.10.19
- Improves `Get-GPOZaurrUpdates` with more verbose messages
- Improves `Get-GPOZaurrUpdates` with more verbose messages
## 0.0.142 - 2021.10.18
- Fixes `Get-GPOZaurrUpdates` when GPO is not linked
- 🐛 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
- 🛑 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
+73
View File
@@ -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
View File
@@ -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
+65
View File
@@ -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
View File
@@ -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
+107
View File
@@ -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
+98 -51
View File
@@ -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
+62 -9
View File
@@ -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)
+138
View File
@@ -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
+18 -3
View File
@@ -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).
+106
View File
@@ -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
+83 -81
View File
@@ -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
+178
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -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
+3 -18
View File
@@ -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
View File
@@ -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
View File
@@ -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
+98 -87
View File
@@ -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
+168
View File
@@ -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
+156
View File
@@ -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
+67 -69
View File
@@ -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
+169
View File
@@ -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
View File
@@ -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
+35 -3
View File
@@ -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
+25 -4
View File
@@ -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'
+1 -1
View File
@@ -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 -1
View File
@@ -1,4 +1,4 @@
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
$Output = Invoke-GPOZaurrContent -Verbose -OutputType HTML, Object -Open -GPOPath "C:\Support\GitHub\GpoZaurr\Ignore\NewExamples" ##-Type LocalGroups
$Output = Invoke-GPOZaurrContent -SingleObject -Verbose -OutputType HTML, Object -Open -GPOPath "C:\Users\przemyslaw.klys\OneDrive - Evotec\Desktop\Test"
$Output | Format-Table
+1 -1
View File
@@ -1,3 +1,3 @@
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
Invoke-GPOZaurr -Type GPOUpdates -Online -Verbose #-IncludeDomains 'ad.evotec.pl'
Invoke-GPOZaurr -Online -Verbose -FilePath $PSScriptRoot\Reports\GPOZaurr.html -SplitReports
@@ -1,6 +1,5 @@
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
$OUs = Get-GPOZaurrOrganizationalUnit
$Ous | Format-Table
@@ -13,5 +12,6 @@ Get-GPOZaurrOrganizationalUnit -Verbose -ExcludeOrganizationalUnit @(
) | Format-Table
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'
'*OU=Accounts,OU=Administration,DC=ad,DC=evotec,DC=xyz'
)
+3
View File
@@ -0,0 +1,3 @@
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
Export-GPOZaurrContent -FolderOutput $PSScriptRoot\ExportedXML -ReportType XML
+4
View File
@@ -0,0 +1,4 @@
Import-Module .\GPoZaurr.psd1 -Force
$Data = Invoke-GPOZaurr -Online -FilePath $PSScriptRoot\Reports\GPOZaurr.html -Type GPORedirect -PassThru
$Data.GPORedirect
+13 -13
View File
@@ -4,31 +4,31 @@
CmdletsToExport = @()
CompanyName = 'Evotec'
CompatiblePSEditions = @('Desktop')
Copyright = '(c) 2011 - 2021 Przemyslaw Klys @ Evotec. All rights reserved.'
Copyright = '(c) 2011 - 2023 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-GPOZaurrOrganizationalUnit', 'Get-GPOZaurrOwner', 'Get-GPOZaurrPassword', 'Get-GPOZaurrPermission', 'Get-GPOZaurrPermissionAnalysis', 'Get-GPOZaurrPermissionConsistency', 'Get-GPOZaurrPermissionIssue', 'Get-GPOZaurrPermissionRoot', 'Get-GPOZaurrPermissionSummary', 'Get-GPOZaurrSysvolDFSR', 'Get-GPOZaurrUpdates', 'Get-GPOZaurrWMI', 'Invoke-GPOZaurr', 'Invoke-GPOZaurrContent', 'Invoke-GPOZaurrPermission', 'Invoke-GPOZaurrSupport', 'New-GPOZaurrWMI', 'Optimize-GPOZaurr', 'Remove-GPOPermission', 'Remove-GPOZaurr', 'Remove-GPOZaurrBroken', 'Remove-GPOZaurrDuplicateObject', 'Remove-GPOZaurrFolders', 'Remove-GPOZaurrLegacyFiles', 'Remove-GPOZaurrLinkEmptyOU', 'Remove-GPOZaurrPermission', 'Remove-GPOZaurrWMI', 'Repair-GPOZaurrBrokenLink', 'Repair-GPOZaurrNetLogonOwner', 'Repair-GPOZaurrPermission', 'Repair-GPOZaurrPermissionConsistency', 'Restore-GPOZaurr', 'Save-GPOZaurrFiles', 'Set-GPOOwner', 'Set-GPOZaurrOwner', 'Set-GPOZaurrStatus', 'Skip-GroupPolicy')
FunctionsToExport = @('Add-GPOPermission', 'Add-GPOZaurrPermission', 'Backup-GPOZaurr', 'Clear-GPOZaurrSysvolDFSR', 'ConvertFrom-CSExtension', 'Export-GPOZaurrContent', 'Find-CSExtension', 'Get-GPOZaurr', 'Get-GPOZaurrAD', 'Get-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-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.146'
ModuleVersion = '1.0.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.214'
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.266'
}, @{
ModuleVersion = '0.0.135'
ModuleName = 'ADEssentials'
Guid = '9fc9fd61-7f11-4f4b-a527-084086f1905f'
}, @{
ModuleVersion = '0.0.158'
ModuleName = 'PSWriteHTML'
Guid = 'a7bdf640-f5cb-4acf-9de0-365b322d245c'
ModuleName = 'ADEssentials'
ModuleVersion = '0.0.165'
}, 'CimCmdlets', 'Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Utility', 'Microsoft.PowerShell.Security')
RootModule = 'GPOZaurr.psm1'
}
+1 -1
View File
@@ -106,7 +106,7 @@
foreach ($OU in $ListOU) {
$Domain = ConvertFrom-DistinguishedName -ToDomainCN -DistinguishedName $OU
$ObjectsInOu = Get-ADObject -LDAPFilter "(|(ObjectClass=user)(ObjectClass=contact)(ObjectClass=computer)(ObjectClass=group)(objectClass=inetOrgPerson))" -SearchBase $OU -Server $ForestInformation['QueryServers'][$Domain]['hostname'][0]
$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] @{
+40
View File
@@ -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
}
}
+3 -4
View File
@@ -7,7 +7,6 @@
[switch] $OwnerOnly,
[System.Collections.IDictionary] $ADAdministrativeGroups,
[string] $Splitter = [System.Environment]::NewLine,
[switch] $ReturnObject,
[System.Collections.IDictionary] $ExcludeGroupPolicies,
[string[]] $Type,
[System.Collections.IDictionary] $LinksSummaryCache
@@ -134,7 +133,7 @@
# 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. Assesing EMPTY using old method which can report false positives. Be careful please."
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 {
@@ -224,7 +223,7 @@
} elseif ($ADAdministrativeGroups) {
$OwnerType = 'Unknown'
} else {
$OwnerType = 'Unable to asses (local files?)'
$OwnerType = 'Unable to assess (local files?)'
}
}
# Mark GPO as excluded
@@ -399,4 +398,4 @@
}
}
}
}
}
+79
View File
@@ -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
}
}
}
}
}
@@ -32,7 +32,7 @@
$Script:Reporting['GPOOrganizationalUnit']['Variables']['DeleteOU']++
#$Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFix']++
#$Script:Reporting['GPOOrganizationalUnit']['Variables']['WillFixPerDomain'][$OU.DomainName]++
} elseif ($OU.Status -contains 'Excluded') {
} 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 {
@@ -139,6 +139,7 @@
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) {
@@ -1,6 +1,6 @@
$GPOZaurrPermissionsAdministrative = [ordered] @{
Name = 'Group Policy Administrative Permissions'
Enabled = $true
Enabled = $false
Action = $null
Data = $null
Execute = {
+1 -1
View File
@@ -1,6 +1,6 @@
$GPOZaurrPermissionsRead = [ordered] @{
Name = 'Group Policy Authenticated Users Permissions'
Enabled = $true
Enabled = $false
Action = $null
Data = $null
Execute = {
+1 -1
View File
@@ -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 = {
+50
View File
@@ -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
}
+61
View File
@@ -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
View File
@@ -13,6 +13,7 @@
GPOPermissionsRead = $GPOZaurrPermissionsRead
GPOPermissionsRoot = $GPOZaurrPermissionsRoot
GPOPermissionsUnknown = $GPOZaurrPermissionsUnknown
GPORedirect = $GPOZaurrGPORedirects
GPOFiles = $GPOZaurrFiles
GPOBlockedInheritance = $GPOZaurrBlockedInheritance
GPOAnalysis = $GPOZaurrAnalysis
+19 -2
View File
@@ -380,6 +380,23 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'FSLogix' -SingleObject
}
}
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 = @(
@{
@@ -393,10 +410,10 @@
'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 = @{
+43
View File
@@ -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 $ReportTypeF"
$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
}
}
}
}
+68 -2
View File
@@ -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
}
+19 -18
View File
@@ -85,26 +85,27 @@
}
Write-Verbose -Message "Get-GPOZaurrAD - Searching domain $Domain with filter $($Splat['Filter'])"
Get-ADObject @Splat -Properties DisplayName, Name, Created, Modified, ntSecurityDescriptor, gPCFileSysPath, gPCFunctionalityVersion, gPCWQLFilter, gPCMachineExtensionNames, Description, CanonicalName, DistinguishedName | ForEach-Object -Process {
$DomainCN = ConvertFrom-DistinguishedName -DistinguishedName $_.DistinguishedName -ToDomainCN
$GUID = $_.Name -replace '{' -replace '}'
$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 $($_.DisplayName) / Domain: $($DomainCN)"
Write-Warning "Get-GPOZaurrAD - GPO GUID ($($($GUID.Replace("`n",' ')))) is incorrect. Skipping $($Object.DisplayName) / Domain: $($DomainCN)"
} 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['Owner'] = $_.ntSecurityDescriptor.Owner
$Output['GPOCanonicalName'] = $_.CanonicalName
$Output['GPODomainDistinguishedName'] = ConvertFrom-DistinguishedName -DistinguishedName $_.DistinguishedName -ToDC
$Output['GPODistinguishedName'] = $_.DistinguishedName
[PSCustomObject] $Output
[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
}
}
}
}
+6 -1
View File
@@ -68,7 +68,12 @@
DomainName = ConvertFrom-DistinguishedName -ToDomainCN -DistinguishedName $OU.DistinguishedName
}
if ($InheritanceInformation.BlockedInheritance -and $IncludeGroupPoliciesForBlockedObjects.IsPresent) {
$GPInheritance = Get-GPInheritance -Target $OU.distinguishedName
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
+14 -1
View File
@@ -13,6 +13,7 @@
$CachedGPO = [ordered] @{}
$ForestInformation = Get-WinADForestDetails -Extended -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation
$DefaultFolders = Get-WellKnownFolders -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation
$GroupPolicies = Get-GPOZaurrAD -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation
foreach ($GPO in $GroupPolicies) {
$CachedGPO[$GPO.GPODistinguishedName] = $GPO
@@ -68,7 +69,7 @@
}
}
# Find all objects in those OUs
$ObjectsInOu = Get-ADObject -LDAPFilter "(|(ObjectClass=user)(ObjectClass=contact)(ObjectClass=computer)(ObjectClass=group)(objectClass=inetOrgPerson))" -SearchBase $TopOU.distinguishedName -Server $ForestInformation['QueryServers'][$Domain]['hostname'][0]
$ObjectsInOu = Get-ADObject -LDAPFilter "(|(ObjectClass=user)(ObjectClass=contact)(ObjectClass=computer)(ObjectClass=group)(objectClass=inetOrgPerson)(ObjectClass=PrintQueue))" -SearchBase $TopOU.distinguishedName -Server $ForestInformation['QueryServers'][$Domain]['hostname'][0]
Write-Verbose "Get-GPOZaurrOrganizationalUnit - Processing $($Domain) / $($TOPOU.DistinguishedName) [$CountTop/$($TopOrganizationalUnits.Count)], found $($ObjectsInOu.Count) objects to process."
foreach ($Object in $ObjectsInOu) {
$Place = ConvertFrom-DistinguishedName -ToOrganizationalUnit -DistinguishedName $Object.DistinguishedName
@@ -117,6 +118,12 @@
}
}
}
foreach ($Exclude in $DefaultFolders) {
if ($OU -eq "$Exclude") {
$Found = $false
break
}
}
if (-not $Found) {
continue
}
@@ -129,6 +136,12 @@
}
}
}
foreach ($Exclude in $DefaultFolders) {
if ($OU -eq "$Exclude") {
$Status = 'Excluded, Default OU'
break
}
}
}
[PSCustomObject] @{
+2 -2
View File
@@ -95,8 +95,8 @@
}
$Object['Owner'] = $_.Owner # : EVOTEC\Enterprise Admins
$Object['Path'] = $_.Path
$Object['SysVolPath '] = $SysvolPath
$Object['Id '] = $_.Id # : 8a7bc515-d7fd-4d1f-90b8-e47c15f89295
$Object['SysVolPath'] = $SysvolPath
$Object['Id'] = $_.Id # : 8a7bc515-d7fd-4d1f-90b8-e47c15f89295
$Object['GpoStatus'] = $_.GpoStatus # : AllSettingsEnabled
$Object['Description'] = $_.Description # :
$Object['CreationTime'] = $_.CreationTime # : 04.03.2020 17:19:42
+164
View File
@@ -0,0 +1,164 @@
function Get-GPOZaurrRedirect {
<#
.SYNOPSIS
Command to detect if GPOs have correct path in SYSVOL, or someone changed it manually.
.DESCRIPTION
Command to detect if GPOs have correct path in SYSVOL, or someone changed it manually.
.PARAMETER GPOName
Provide GPO name to search for. By default command returns all GPOs
.PARAMETER GPOGuid
Provide GPO GUID to search for. By default command returns all GPOs
.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 DateFrom
Provide a date from which to start the search, by default the last X days are used
.PARAMETER DateTo
Provide a date to which to end the search, by default the last X days are used
.PARAMETER DateRange
Provide a date range to search for, by default the last X days are used
.PARAMETER DateProperty
Choose a date property. It can be WhenCreated or WhenChanged or both. By default whenCreated is used for comparison purposes
.PARAMETER ExtendedForestInformation
Ability to provide Forest Information from another command to speed up processing
.EXAMPLE
Get-GPOZaurrRedirect | Format-Table
.NOTES
General notes
#>
[cmdletbinding(DefaultParameterSetName = 'Default')]
param(
[Parameter(ParameterSetName = 'GPOName')]
[string] $GPOName,
[Parameter(ParameterSetName = 'GPOGUID')]
[alias('GUID', 'GPOID')][string] $GPOGuid,
[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 {
$ForestInformation = Get-WinADForestDetails -Extended -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains -ExtendedForestInformation $ExtendedForestInformation
}
Process {
foreach ($Domain in $ForestInformation.Domains) {
if ($PSCmdlet.ParameterSetName -eq 'GPOGUID') {
if ($GPOGuid) {
if ($GPOGUID -notlike '*{*') {
$GUID = -join ("{", $GPOGUID, '}')
} else {
$GUID = $GPOGUID
}
$Splat = @{
Filter = "(objectClass -eq 'groupPolicyContainer') -and (Name -eq '$GUID')"
Server = $ForestInformation['QueryServers'][$Domain]['HostName'][0]
}
} else {
Write-Warning "Get-GPOZaurrRedirect - GPOGUID parameter is empty. Provide name and try again."
continue
}
} elseif ($PSCmdlet.ParameterSetName -eq 'GPOName') {
if ($GPOName) {
$Splat = @{
Filter = "(objectClass -eq 'groupPolicyContainer') -and (DisplayName -eq '$GPOName')"
Server = $ForestInformation['QueryServers'][$Domain]['HostName'][0]
}
} else {
Write-Warning "Get-GPOZaurrRedirect - GPOName parameter is empty. Provide name and try again."
continue
}
} else {
$Splat = @{
Filter = "(objectClass -eq 'groupPolicyContainer')"
Server = $ForestInformation['QueryServers'][$Domain]['HostName'][0]
}
}
# 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 {
Write-Warning -Message "Get-GPOZaurrRedirect - 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-GPOZaurrRedirect - DateProperty parameter is empty. Provide name and try again."
continue
}
} else {
# not needed
}
Write-Verbose -Message "Get-GPOZaurrRedirect - 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-GPOZaurrRedirect - GPO GUID ($($($GUID.Replace("`n",' ')))) is incorrect. Skipping $($Object.DisplayName) / Domain: $($DomainCN)"
} else {
$Path = $Object.gPCFileSysPath
$ExpectedPath = "\\$($DomainCN)\SYSVOL\$($DomainCN)\Policies\{$($GUID)}"
$Compare = if ($Path -eq $ExpectedPath) { $true } else { $false }
[PSCustomObject]@{
'DisplayName' = $Object.DisplayName
'DomainName' = $DomainCN
'Description' = $Object.Description
'IsCorrect' = $Compare
'GUID' = $GUID
'Path' = $Path
'ExpectedPath' = $ExpectedPath
#$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
}
}
}
}
}
End {
}
}
+38
View File
@@ -1,4 +1,42 @@
function Get-GPOZaurrSysvolDFSR {
<#
.SYNOPSIS
Gets DFSR information from the SYSVOL DFSR
.DESCRIPTION
Gets DFSR information from the SYSVOL DFSR
.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 ExcludeDomainControllers
Exclude specific domain controllers, by default there are no exclusions, as long as VerifyDomainControllers switch is enabled. Otherwise this parameter is ignored.
.PARAMETER 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.
.PARAMETER SkipRODC
Skip Read-Only Domain Controllers. By default all domain controllers are included.
.PARAMETER ExtendedForestInformation
Ability to provide Forest Information from another command to speed up processing
.PARAMETER SearchDFSR
Define DFSR Share. By default it uses SYSVOL Share
.EXAMPLE
$DFSR = Get-GPOZaurrSysvolDFSR
$DFSR | Format-Table *
.NOTES
General notes
#>
[cmdletBinding()]
param(
[alias('ForestName')][string] $Forest,
+41
View File
@@ -1,4 +1,44 @@
function Get-GPOZaurrUpdates {
<#
.SYNOPSIS
Gets the list of GPOs created or updated in the last X number of days.
.DESCRIPTION
Gets the list of GPOs created or updated in the last X number of days.
.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 DateFrom
Provide a date from which to start the search, by default the last X days are used
.PARAMETER DateTo
Provide a date to which to end the search, by default the last X days are used
.PARAMETER DateRange
Provide a date range to search for, by default the last X days are used
.PARAMETER DateProperty
Choose a date property. It can be WhenCreated or WhenChanged or both. By default whenCreated is used for comparison purposes
.PARAMETER ExtendedForestInformation
Ability to provide Forest Information from another command to speed up processing
.EXAMPLE
Get-GPOZaurrUpdates -DateRange Last14Days -DateProperty WhenCreated, WhenChanged -Verbose -IncludeDomains 'ad.evotec.pl' | Format-List
.EXAMPLE
Get-GPOZaurrUpdates -DateRange Last14Days -DateProperty WhenCreated -Verbose | Format-Table
.NOTES
General notes
#>
[cmdletBinding(DefaultParameterSetName = 'DateRange')]
param(
[parameter(ParameterSetName = 'Dates')]
@@ -86,6 +126,7 @@
}
[PSCustomObject] @{
DisplayName = $GPO.DisplayName
GUID = ConvertFrom-DistinguishedName -DistinguishedName $GPO.GPODistinguishedName
DomainName = $GPO.DomainName
Owner = $GPO.Owner
OwnerName = $Owner.Name
+23 -47
View File
@@ -46,6 +46,9 @@
.PARAMETER 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.
.PARAMETER SplitReports
Split report into multiple files, one for each report. This can be useful for large domains with huge reports.
.EXAMPLE
Invoke-GPOZaurr
@@ -71,7 +74,8 @@
[alias('ForestName')][string] $Forest,
[string[]] $ExcludeDomains,
[alias('Domain', 'Domains')][string[]] $IncludeDomains,
[switch] $Online
[switch] $Online,
[switch] $SplitReports
)
Reset-GPOZaurrStatus # This makes sure types are at it's proper status
@@ -181,56 +185,28 @@
$TimeEndGPOList = Stop-TimeLog -Time $TimeLogGPOList -Option OneLiner
$Script:Reporting[$T]['Time'] = $TimeEndGPOList
Write-Color -Text '[i]', '[End ] ', $($Script:GPOConfiguration[$T]['Name']), " [Time to execute: $TimeEndGPOList]" -Color Yellow, DarkGray, Yellow, DarkGray
if ($SplitReports) {
$TimeLogHTML = Start-TimeLog
New-HTMLReportWithSplit -FilePath $FilePath -Online:$Online -HideHTML:$HideHTML -CurrentReport $T
$TimeLogEndHTML = Stop-TimeLog -Time $TimeLogHTML -Option OneLiner
Write-Color -Text '[i]', '[HTML ] ', 'Generating HTML report', " [Time to execute: $TimeLogEndHTML]" -Color Yellow, DarkGray, Yellow, DarkGray
}
}
}
# Generate pretty HTML
$TimeLogHTML = Start-TimeLog
if (-not $FilePath) {
$FilePath = Get-FileName -Extension 'html' -Temporary
if (-not $SplitReports) {
# Generate pretty HTML
$TimeLogHTML = Start-TimeLog
if (-not $FilePath) {
$FilePath = Get-FileName -Extension 'html' -Temporary
}
New-HTMLReportAll -FilePath $FilePath -Online:$Online -HideHTML:$HideHTML -Type $Type
$TimeLogEndHTML = Stop-TimeLog -Time $TimeLogHTML -Option OneLiner
Write-Color -Text '[i]', '[HTML ] ', 'Generating HTML report', " [Time to execute: $TimeLogEndHTML]" -Color Yellow, DarkGray, Yellow, DarkGray
}
Write-Color -Text '[i]', '[HTML ] ', "Generating HTML report ($FilePath)" -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 {
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
$TimeLogEndHTML = Stop-TimeLog -Time $TimeLogHTML -Option OneLiner
Write-Color -Text '[i]', '[HTML ] ', 'Generating HTML report', " [Time to execute: $TimeLogEndHTML]" -Color Yellow, DarkGray, Yellow, DarkGray
if ($PassThru) {
$Script:Reporting
}
+8 -6
View File
@@ -22,11 +22,11 @@
$BackupFinalPath = $BackupPath
}
Write-Verbose "Remove-GPOZaurr - Backing up to $BackupFinalPath"
$null = New-Item -ItemType Directory -Path $BackupFinalPath -Force
$null = New-Item -ItemType Directory -Path $BackupFinalPath -Force -WhatIf:$false
} else {
$BackupRequired = $false
}
$Count = 0
$CountProcessedGPO = 0
}
Process {
$getGPOZaurrSplat = @{
@@ -39,6 +39,11 @@
}
Get-GPOZaurr @getGPOZaurrSplat | ForEach-Object {
if ($LimitProcessing -ne 0 -and $CountProcessedGPO -ge $LimitProcessing) {
Write-Warning -Message "Remove-GPOZaurr - LimitProcessing ($CountProcessedGPO / $LimitProcessing) reached. Stopping processing"
break
}
$DeleteRequired = $false
if ($Type -contains 'Empty') {
@@ -89,10 +94,7 @@
Write-Warning "Remove-GPOZaurr - Removing GPO $($_.DisplayName) from $($_.DomainName) failed: $($_.Exception.Message)"
}
}
$Count++
if ($LimitProcessing -eq $Count) {
break
}
$CountProcessedGPO++
}
}
}
+31
View File
@@ -1,4 +1,35 @@
function Save-GPOZaurrFiles {
<#
.SYNOPSIS
Exports GPO XML data to files and saves it to a given path
.DESCRIPTION
Exports GPO XML data to files and saves it to a given path
.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
Path where to save XML files from GPOReport
.PARAMETER DeleteExisting
Delete existing files before saving new ones
.EXAMPLE
Save-GPOZaurrFiles -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPOExportEvotec' -DeleteExisting -Verbose
.NOTES
General notes
#>
[cmdletBinding()]
param(
[alias('ForestName')][string] $Forest,
-288
View File
@@ -1,288 +0,0 @@
Clear-Host
Import-Module "C:\Users\przemyslaw.klys\OneDrive - Evotec\Support\GitHub\PSPublishModule\PSPublishModule.psd1" -Force
$Configuration = @{
Information = @{
ModuleName = 'GPOZaurr'
DirectoryProjects = 'C:\Support\GitHub'
FunctionsToExport = 'Public'
AliasesToExport = 'Public'
Manifest = @{
# Version number of this module.
ModuleVersion = '0.0.X'
# 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'
RequiredModules = @(
@{ ModuleName = 'PSSharedGoods'; ModuleVersion = 'Latest'; Guid = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe' }
@{ ModuleName = 'ADEssentials'; ModuleVersion = 'Latest'; Guid = '9fc9fd61-7f11-4f4b-a527-084086f1905f' }
@{ ModuleName = 'PSWriteHTML'; ModuleVersion = "Latest"; Guid = 'a7bdf640-f5cb-4acf-9de0-365b322d245c' }
)
ExternalModuleDependencies = @(
#"ActiveDirectory"
#"GroupPolicy"
"CimCmdlets"
'Microsoft.PowerShell.Management'
'Microsoft.PowerShell.Utility'
'Microsoft.PowerShell.Security'
)
CommandModuleDependencies = @{
ActiveDirectory = @(
'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'
)
GroupPolicy = @(
'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'
)
}
}
}
Options = @{
Merge = @{
Sort = 'None'
FormatCodePSM1 = @{
Enabled = $true
RemoveComments = $false
FormatterSettings = @{
IncludeRules = @(
'PSPlaceOpenBrace',
'PSPlaceCloseBrace',
'PSUseConsistentWhitespace',
'PSUseConsistentIndentation',
'PSAlignAssignmentStatement',
'PSUseCorrectCasing'
)
Rules = @{
PSPlaceOpenBrace = @{
Enable = $true
OnSameLine = $true
NewLineAfter = $true
IgnoreOneLineBlock = $true
}
PSPlaceCloseBrace = @{
Enable = $true
NewLineAfter = $false
IgnoreOneLineBlock = $true
NoEmptyLineBefore = $false
}
PSUseConsistentIndentation = @{
Enable = $true
Kind = 'space'
PipelineIndentation = 'IncreaseIndentationAfterEveryPipeline'
IndentationSize = 4
}
PSUseConsistentWhitespace = @{
Enable = $true
CheckInnerBrace = $true
CheckOpenBrace = $true
CheckOpenParen = $true
CheckOperator = $true
CheckPipe = $true
CheckSeparator = $true
}
PSAlignAssignmentStatement = @{
Enable = $true
CheckHashtable = $true
}
PSUseCorrectCasing = @{
Enable = $true
}
}
}
}
FormatCodePSD1 = @{
Enabled = $true
RemoveComments = $false
}
Integrate = @{
ApprovedModules = 'PSSharedGoods', 'PSWriteColor', 'Connectimo', 'PSUnifi', 'PSWebToolbox', 'PSMyPassword', 'ADEssentials'
}
}
Standard = @{
FormatCodePSM1 = @{
}
FormatCodePSD1 = @{
Enabled = $true
#RemoveComments = $true
}
}
PowerShellGallery = @{
ApiKey = 'C:\Support\Important\PowerShellGalleryAPI.txt'
FromFile = $true
}
GitHub = @{
ApiKey = 'C:\Support\Important\GithubAPI.txt'
FromFile = $true
UserName = 'EvotecIT'
#RepositoryName = 'PSPublishModule' # not required, uses project name
}
Documentation = @{
Path = 'Docs'
PathReadme = 'Docs\Readme.md'
}
Style = @{
PSD1 = 'Minimal' # Native
}
}
Steps = @{
BuildModule = @{ # requires Enable to be on to process all of that
Enable = $true
DeleteBefore = $false
Merge = $true
MergeMissing = $true
SignMerged = $true
Releases = $true
ReleasesUnpacked = $false
RefreshPSD1Only = $false
}
BuildDocumentation = @{
Enable = $false # enables documentation processing
StartClean = $true # always starts clean
UpdateWhenNew = $true # always updates right after new
}
ImportModules = @{
Self = $true
RequiredModules = $false
Verbose = $false
}
PublishModule = @{ # requires Enable to be on to process all of that
Enabled = $true
Prerelease = ''
RequireForce = $false
GitHub = $true
}
}
}
New-PrepareModule -Configuration $Configuration