Compare commits

..

45 Commits

Author SHA1 Message Date
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
23 changed files with 450 additions and 173 deletions
@@ -1,5 +1,4 @@
Clear-Host
Import-Module "C:\Users\przemyslaw.klys\OneDrive - Evotec\Support\GitHub\PSPublishModule\PSPublishModule.psd1" -Force
$Configuration = @{
Information = @{
@@ -34,7 +33,7 @@ $Configuration = @{
RequiredModules = @(
@{ ModuleName = 'PSSharedGoods'; ModuleVersion = 'Latest'; Guid = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe' }
@{ ModuleName = 'ADEssentials'; ModuleVersion = 'Latest'; Guid = '9fc9fd61-7f11-4f4b-a527-084086f1905f' }
@{ ModuleName = 'ADEssentials'; ModuleVersion = '0.0.148'; Guid = '9fc9fd61-7f11-4f4b-a527-084086f1905f' }
@{ ModuleName = 'PSWriteHTML'; ModuleVersion = "Latest"; Guid = 'a7bdf640-f5cb-4acf-9de0-365b322d245c' }
)
ExternalModuleDependencies = @(
@@ -267,7 +266,7 @@ $Configuration = @{
RefreshPSD1Only = $false
}
BuildDocumentation = @{
Enable = $false # enables documentation processing
Enable = $true # enables documentation processing
StartClean = $true # always starts clean
UpdateWhenNew = $true # always updates right after new
}
+29 -1
View File
@@ -1,7 +1,35 @@
# GPOZaurr Release History
## 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
- 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)
+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
+105 -103
View File
@@ -8,7 +8,7 @@ schema: 2.0.0
# Get-GPOZaurrUpdates
## SYNOPSIS
{{ Fill in the Synopsis }}
Gets the list of GPOs created or updated in the last X number of days.
## SYNTAX
@@ -26,113 +26,24 @@ Get-GPOZaurrUpdates [-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDom
```
## DESCRIPTION
{{ Fill in the Description }}
Gets the list of GPOs created or updated in the last X number of days.
## EXAMPLES
### Example 1
```powershell
PS C:\> {{ Add example code here }}
### EXAMPLE 1
```
Get-GPOZaurrUpdates -DateRange Last14Days -DateProperty WhenCreated, WhenChanged -Verbose -IncludeDomains 'ad.evotec.pl' | Format-List
```
{{ Add example description here }}
### EXAMPLE 2
```
Get-GPOZaurrUpdates -DateRange Last14Days -DateProperty WhenCreated -Verbose | Format-Table
```
## PARAMETERS
### -DateFrom
{{ Fill DateFrom Description }}
```yaml
Type: DateTime
Parameter Sets: Dates
Aliases:
Required: True
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: DateRange
Aliases:
Accepted values: PastHour, CurrentHour, PastDay, CurrentDay, PastMonth, CurrentMonth, PastQuarter, CurrentQuarter, Last14Days, Last21Days, Last30Days, Last7Days, Last3Days, Last1Days
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -DateTo
{{ Fill DateTo Description }}
```yaml
Type: DateTime
Parameter Sets: Dates
Aliases:
Required: True
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: Named
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: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Forest
{{ Fill Forest Description }}
Target different Forest, by default current forest is used
```yaml
Type: String
@@ -146,8 +57,24 @@ 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
{{ Fill IncludeDomains Description }}
Include only specific domains, by default whole forest is scanned
ą
```yaml
Type: String[]
@@ -161,16 +88,91 @@ 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
### None
## OUTPUTS
### System.Object
## NOTES
General notes
## RELATED LINKS
+17 -1
View File
@@ -15,7 +15,7 @@ Single cmdlet that provides 360 degree overview of Group Policies in Active Dire
```
Invoke-GPOZaurr [[-Exclusions] <Object>] [-FilePath <String>] [[-Type] <String[]>] [-PassThru] [-HideHTML]
[-HideSteps] [-ShowError] [-ShowWarning] [-Forest <String>] [-ExcludeDomains <String[]>]
[-IncludeDomains <String[]>] [-Online] [<CommonParameters>]
[-IncludeDomains <String[]>] [-Online] [-SplitReports] [<CommonParameters>]
```
## DESCRIPTION
@@ -224,6 +224,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -SplitReports
Split report into multiple files, one for each report.
This can be useful for large domains with huge reports.
```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).
+4 -1
View File
@@ -26,6 +26,9 @@ 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 }}
@@ -106,7 +109,7 @@ Detects Group Policy missing Authenticated Users permission while not having hig
Gets DFSR information from the SYSVOL DFSR
### [Get-GPOZaurrUpdates](Get-GPOZaurrUpdates.md)
{{ Fill in the Synopsis }}
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
+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
+3
View File
@@ -0,0 +1,3 @@
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
Export-GPOZaurrContent -FolderOutput $PSScriptRoot\ExportedXML -ReportType XML
+6 -6
View File
@@ -4,11 +4,11 @@
CmdletsToExport = @()
CompanyName = 'Evotec'
CompatiblePSEditions = @('Desktop')
Copyright = '(c) 2011 - 2021 Przemyslaw Klys @ Evotec. All rights reserved.'
Copyright = '(c) 2011 - 2022 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-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.149'
ModuleVersion = '0.0.157'
PowerShellVersion = '5.1'
PrivateData = @{
PSData = @{
@@ -18,15 +18,15 @@
}
}
RequiredModules = @(@{
ModuleVersion = '0.0.214'
ModuleVersion = '0.0.253'
ModuleName = 'PSSharedGoods'
Guid = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe'
}, @{
ModuleVersion = '0.0.138'
ModuleVersion = '0.0.148'
ModuleName = 'ADEssentials'
Guid = '9fc9fd61-7f11-4f4b-a527-084086f1905f'
}, @{
ModuleVersion = '0.0.163'
ModuleVersion = '0.0.180'
ModuleName = 'PSWriteHTML'
Guid = 'a7bdf640-f5cb-4acf-9de0-365b322d245c'
}, 'CimCmdlets', 'Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Utility', 'Microsoft.PowerShell.Security')
@@ -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
}
}
}
+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
}
}
}
}
+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
+1 -1
View File
@@ -95,7 +95,7 @@
}
$Object['Owner'] = $_.Owner # : EVOTEC\Enterprise Admins
$Object['Path'] = $_.Path
$Object['SysVolPath '] = $SysvolPath
$Object['SysVolPath'] = $SysvolPath
$Object['Id '] = $_.Id # : 8a7bc515-d7fd-4d1f-90b8-e47c15f89295
$Object['GpoStatus'] = $_.GpoStatus # : AllSettingsEnabled
$Object['Description'] = $_.Description # :
+1
View File
@@ -126,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
}