EvotecIT / GPOZaurr
- среда, 27 января 2021 г. в 00:27:38
PowerShell
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.
GPOZaurr requires RSAT installed to provide results. If you don't have them you can install them as below. Keep in mind it also installs GUI tools so it shouldn't be installed on user workstations.
# Windows 10 Latest
Add-WindowsCapability -Online -Name 'Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0'
Add-WindowsCapability -Online -Name 'Rsat.GroupPolicy.Management.Tools~~~~0.0.1.0'Finally just install module:
Install-Module -Name GPOZaurr -AllowClobber -ForceForce and AllowClobber aren't necessary, but they do skip errors in case some appear.
Update-Module -Name GPOZaurrThat's it. Whenever there's a new version, you run the command, and you can enjoy it. Remember that you may need to close, reopen PowerShell session if you have already used module before updating it.
The essential thing is if something works for you on production, keep using it till you test the new version on a test computer. I do changes that may not be big, but big enough that auto-update may break your code. For example, small rename to a parameter and your code stops working! Be responsible!
To understand the usage I've created blog post you may find useful
Invoke-GPOZaurr
Invoke-GPOZaurrContent
WindowsTimeService typeInvoke-GPOZaurrInvoke-GPOZaurrInvoke-GPOZaurrInvoke-GPOZaurrInvoke-GPOZaurr
GPOConsistencyInvoke-GPOZaurrInvoke-GPOZaurrContentGet-GPOZaurr
GPOBrokenLinkGet-GPOZaurrBrokenLinkRepair-GPOZaurrBrokenLinkGet-GPOZaurr
GPOBrokenLinkGet-GPOZaurr
GPOBrokenLinkGet-GPOZaurrBrokenLinkRepair-GPOZaurrBrokenLinkGet-GPOZaurrLink
Other to OrganizationalUnitGet-GPOZaurrLinkSummaryGet-GPOZaurr to properly detect linked GPOs in sites/cross-domainInvoke-GPOZaurrPermission
Other to OrganizationalUnitInvoke-GPOZaurr
GPOLinks basic listGet-GPOZaurrBroken
ObjectClass IssueNot available on SYSVOL, Not available in AD, Exists, Permissions Issue, ObjectClass IssueRemove-GPOZaurrBroken
ObjectClass IssueInvoke-GPOZaurr
GPOListGPOOrphans to GPOBrokenGPOBroken with ObjectClass issueInvoke-GPOZaurr
GPOPermissionsReadGPOPermissionsInvoke-GPOZaurr
GPOList - require GPO to be 7 days old for deletion to be proposedGPOPermissions - one stop for permissionsRemove-GPOZaurr - added RequireDays parameter to prevent deletion of just modified GPOsGet-GPOZaurrPermissionAnalysisRepair-GPOZaurrPermissionInvoke-GPOZaurr
GPOList - fixed unexpected ending of cmdlet when error occurs (for example deleted GPO while script is running) which could impact resultsGet-GPOZaurr - fixed unexpected ending of cmdlet when error occurs (for example deleted GPO while script is running), improved code baseInvoke-GPOZaurrSupportInvoke-GPOZaurr
GPOList - added more data, did small reorganizationInvoke-GPOZaurr
GPOList - added more data, added Optimization StepSet-GPOZaurrStatusOptimize-GPOZaurrInvoke-GPOZaurrPermission which would not remove permission due to internal changes earlier onBackup-GPOZaurr
Disabled. It's now possbile to backup All (default), Empty,Unlinked,Disabled or a mix of themGPOPath parameterInvoke-GPOZaurr
GPOList - added ability for ExclusionsRemove-GPOZaurr - added ExclusionsInvoke-GPOZaurr
GPOList reverted charts colors for entries to match colorsSkip-GroupPolicy to use within Invoke-GPOZaurrInvoke-GPOZaurr with basic support for ExclusionsGet-GPOZaurr with basic support for ExclusionsRemove-GPOZaurrPermission error handlingInvoke-GPOZaurrSupportInvoke-GPOZaurr
GPOList improved with more data, more problems and clearer informationRemove-GPOZaurr
Get-GPOZaurr detecting more issues, delivering more dataInvoke-GPOZaurr (WIP)
GPOPermissionsUnknownInvoke-GPOZaurr (WIP)
GPODuplicates
GPOPermissionsUnknownRemove-GPOZaurrDuplicateObject - removed Confirm requirementGet-GPOZaurrNetLogon with more verboseRepair-GPOZaurrNetLogonOwner with more verbose and fix for LimitProcessingAdd-GPOZaurrPermissionInvoke-GPOZaurr (WIP)
GPOPermissionsAdministrativeAdd-GPOZaurrPermissionRemove-GPOZaurrBrokenRemove-GPOZaurrBrokenInvoke-GPOZaurr (WIP)
NetLogonPermissions into NetLogonPermissions and NetLogonOwnersNetLogonPermissionsNetLogonOwnersGet-GPOZaurrFilesGet-GPOZaurrNetLogonGet-GPOZaurrNetLogonInvoke-GPOZaurr (WIP)
NetLogonPermissionsGet-GPOZaurrNetLogonInvoke-GPOZaurr (WIP)
Get-GPOZaurrPermissionIssue to detect permission issue with no rightsInvoke-GPOZaurr (WIP)
GPOPermissionsRead improved detection of problems with low permissionsSet-GPOZaurrOwner in case of missing permissions to not throw errorsInvoke-GPOZaurr (WIP)
GPOPermissionsRead addedInvoke-GPOZaurr (WIP)
GPOOrphans clearer options, updated texts, split per domainGPOOwners clearer options, updated texts, split per domainAdd-GPOZaurrPermission
All to process all GPOsRemove-GPOZaurrPermissionSet-GPOZaurrOwner
Force to force GPO Owner to any principal (normally only Domain Admins)Invoke-GPOZaurr - type GPOOrphansRemove-GPOZaurrBroken more verboseGet-GPOZaurrBroken more verboseInvoke-GPOZaurr - type GPOOrphansInvoke-GPOZaurr - type GPOList - needs more workGet-GPOZaurr with better detection of Empty Policies (needs testing)Invoke-GPOZaurr (WIP)Get-GPOZaurrNetLogon to better handle errorsGet-GPOZaurrPermissionConsistency to stop checking consistency if path doesn't existsInvoke-GPOZaurr (WIP)Invoke-GPOZaurr (WIP)Get-GPOZaurrInvoke-GPOZaurr (WIP)Invoke-GPOZaurr (WIP)Get-GPOZaurrDuplicateObjectRemove-GPOZaurrDuplicateObjectInvoke-GPOZaurr (WIP)Get-GPOZaurrNetLogonGet-GPOZaurrOwnerSet-GPOZaurrOwnerRepair-GPOZaurrNetLogonOwnerInvoke-GPOZaurr (WIP)Show-GPOZaurr to Invoke-GPOZaurrInvoke-GPOZaurr to Invoke-GPOZaurrContentGet-GPOZaurrPermissionConsistency - don't check for inherited permissions if top level ones are inconsistentInvoke-GPOZaurr (WIP)Show-GPOZaurr (WIP)Show-GPOZaurr (WIP)Show-GPOZaurr (WIP)Remove-GPOZaurrOrphaned to Remove-GPOZaurrBroken keeping it as an aliasGet-GPOZaurrSysvol to Get-GPOZaurrBroken keeping it as an aliasShow-GPOZaurr (WIP)Invoke-GPOZaurrContent back to Invoke-GPOZaurrShow-GPOZaurr (WIP)OutputType,OutputType,Open,Online parameters to Invoke-GPOZaurrGet-GPOZaurrNetLogonGet-GPOZaurrOwnerGet-GPOZaurrSysvolInvoke-GPOZaurr to Invoke-GPOZaurrContent - I want to use Invoke-GPOZaurr for something elseGet-GPOZaurrPermissionConsistency for GPOs without SYSVOL to be reported properlyGet-GPOZaurrPermissionRootRemove-GPOZaurrOrphanedSysvolFolders to Remove-GPOZaurrOrphanedRemove-GPOZaurrOrphaned to deal with orphaned folders but also orphaned AD GPO (No sysvol data)Get-GPOZaurrSysVol to detect orphaned SYSVOL or AD GPO objectsGet-GPOZaurrSysVol to detect permissions issue when reading AD GPO objectsGet-GPOZaurrPermissionRoot to show which users/groups have control over all GPOs (allowed to create/modify)Get-GPOZaurrPermissionSummary to include Get-GPOZaurrPermissionRoot custom permissionsRemove-GPOZaurrPermissionGet-GpoZaurrPermissionGet-GPOZaurrFiles to better handle access issueGet-GPOZaurrFiles from Limited to ExtendedMetaData and fixed missing columnsGet-GPOZaurrPermissionSummaryConvertFrom-CSExtensionFind-CSExtensionGet-GPOZaurrPermissionSummaryGet-GPOZaurrPermissionSummaryGet-GPOZaurrPermissionSummaryGet-GPOZaurrPermissionSummaryGet-GPOZaurrInheritanceInvoke-GPOZaurrSupport (WIP)ConvertFrom-CSExtensionFind-CSExtensionGet-GPOZaurrInheritanceInvoke-GPOZaurr - still work in progressGet-GPOZaurrSysvolDFSRClear-GPOZaurrSysvolDFSR (requires testing)Get-GPOZaurrFilesPolicyDefinitionInvoke-GPOZaurr - still work in progressGet-GPOZaurrFiles - still work in progressRemove-GPOZaurrOrphanedSysvolFolders with backup and support for domainsGet-GPOZaurrAD for better error reportingInvoke-GPOZaurr - still work in progressGet-GPOZaurrAD for CNF duplicatesSave-GPOZaurrFilesInvoke-GPOZaurr (alias: Find-GPO) (heavy work in progress)Get-GPOZaurrLinkSummaryGet-GPOZaurrFiles to list files on NETLOGON/SYSVOL shares with a lot of detailsGet-GPOZaurrLink and SearchBase parameterGet-GPOZaurrLink - canonical link Trim() throwing errors if emptySkipDuplicates to Invoke-GPOZaurrPermission which prevents applying permissions over and over again if 1 GPO is linked to a multiple OU's within another OUGet-GPOZaurrLink - same issue as described on my earlier blog - Get-ADObject : The server has returned the following error: invalid enumeration context..
WARNING: Get-GPOZaurrLink - Processing error The server has returned the following error: invalid enumeration context.WARNING: Get-GPOZaurrLink - Processing error A referral was returned from the serverSkipDuplicates for Get-GPOZaurrLinkInvoke-GPOZaurrPermission with new parameter LimitAdministrativeGroupsToDomain
Invoke-GPOZaurrPermission if it would be run without Administrative permission and GPO wouldn't be accessible for that userInvoke-GPOZaurrPermission with new parameterset LevelGet-GPOZaurrLinkSummary