Compare commits

..

23 Commits

Author SHA1 Message Date
Przemyslaw Klys bfe50f02fe Added Windows Firewall analysis 2021-02-11 12:40:21 +01:00
Przemyslaw Klys 187b44a19d Update readme 2021-02-11 12:35:22 +01:00
Przemyslaw Klys 36793b33c4 PSD1 update 2021-02-11 12:34:01 +01:00
Przemyslaw Klys 94e6c785c1 Update readme 2021-02-11 12:21:03 +01:00
Przemyslaw Klys efbd2b12de Firewall updates 2021-02-11 12:15:27 +01:00
Przemyslaw Klys d0a678353f Update rules 2021-02-10 23:48:01 +01:00
Przemyslaw Klys 6b0f3b332d Added Firewall Rules #7 2021-02-10 23:46:36 +01:00
Przemyslaw Klys 37483c91b5 Update PSD1 2021-02-10 19:51:17 +01:00
Przemyslaw Klys 9172948be3 Added folder redirection #12 2021-02-10 19:50:45 +01:00
Przemyslaw Klys 14567959f7 #12 2021-02-10 19:49:51 +01:00
Przemyslaw Klys 6a9ad14083 Modified readme 2021-02-10 19:25:10 +01:00
Przemyslaw Klys e00de40cd2 Adds description #13 2021-02-10 19:24:04 +01:00
Przemyslaw Klys 6f806698e9 update readme 2021-02-10 12:02:01 +01:00
Przemyslaw Klys 2e1571b0d7 Update 2021-02-10 11:56:31 +01:00
Przemyslaw Klys ffedd2d9d2 Update 2021-02-10 11:56:23 +01:00
Przemyslaw Klys 911bc50f22 Update readme 2021-02-10 11:00:52 +01:00
Przemyslaw Klys 0383d249e9 PSD1 update 2021-02-10 10:57:12 +01:00
Przemyslaw Klys 8070179d27 Update readme 2021-02-10 10:56:48 +01:00
Przemyslaw Klys db67e6191e Improved false-positive detection for Empty on non-english systesm 2021-02-10 10:47:23 +01:00
Przemyslaw Klys db9b6d60c6 PSD1 update 2021-02-09 18:07:24 +01:00
Przemyslaw Klys 2c965d81d5 Small update 2021-02-09 18:01:48 +01:00
Przemyslaw Klys bff372affe Update readme 2021-02-09 17:58:06 +01:00
Przemyslaw Klys 138a0f411e Added information about filepath 2021-02-09 17:56:56 +01:00
11 changed files with 717 additions and 111 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
Description = 'Group Policy Eater is a PowerShell module that aims to gather information about Group Policies but also allows fixing issues that you may find in them.'
FunctionsToExport = @('Add-GPOPermission', 'Add-GPOZaurrPermission', 'Backup-GPOZaurr', 'Clear-GPOZaurrSysvolDFSR', 'ConvertFrom-CSExtension', 'Find-CSExtension', 'Get-GPOZaurr', 'Get-GPOZaurrAD', 'Get-GPOZaurrBackupInformation', 'Get-GPOZaurrBroken', 'Get-GPOZaurrBrokenLink', 'Get-GPOZaurrDictionary', 'Get-GPOZaurrDuplicateObject', 'Get-GPOZaurrFiles', 'Get-GPOZaurrFilesPolicyDefinition', 'Get-GPOZaurrFolders', 'Get-GPOZaurrInheritance', 'Get-GPOZaurrLegacyFiles', 'Get-GPOZaurrLink', 'Get-GPOZaurrLinkSummary', 'Get-GPOZaurrNetLogon', 'Get-GPOZaurrOwner', 'Get-GPOZaurrPassword', 'Get-GPOZaurrPermission', 'Get-GPOZaurrPermissionAnalysis', 'Get-GPOZaurrPermissionConsistency', 'Get-GPOZaurrPermissionIssue', 'Get-GPOZaurrPermissionRoot', 'Get-GPOZaurrPermissionSummary', 'Get-GPOZaurrSysvolDFSR', 'Get-GPOZaurrWMI', 'Invoke-GPOZaurr', 'Invoke-GPOZaurrContent', 'Invoke-GPOZaurrPermission', 'Invoke-GPOZaurrSupport', 'New-GPOZaurrWMI', 'Optimize-GPOZaurr', 'Remove-GPOPermission', 'Remove-GPOZaurr', 'Remove-GPOZaurrBroken', 'Remove-GPOZaurrDuplicateObject', 'Remove-GPOZaurrFolders', 'Remove-GPOZaurrLegacyFiles', 'Remove-GPOZaurrPermission', 'Remove-GPOZaurrWMI', 'Repair-GPOZaurrBrokenLink', 'Repair-GPOZaurrNetLogonOwner', 'Repair-GPOZaurrPermission', 'Repair-GPOZaurrPermissionConsistency', 'Restore-GPOZaurr', 'Save-GPOZaurrFiles', 'Set-GPOOwner', 'Set-GPOZaurrOwner', 'Set-GPOZaurrStatus', 'Skip-GroupPolicy')
GUID = 'f7d4c9e4-0298-4f51-ad77-e8e3febebbde'
ModuleVersion = '0.0.117'
ModuleVersion = '0.0.122'
PowerShellVersion = '5.1'
PrivateData = @{
PSData = @{
@@ -0,0 +1,70 @@
function ConvertTo-XMLFolderRedirection {
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
[switch] $SingleObject
)
if ($SingleObject) {
$CreateGPO = [ordered]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
#GpoCategory = $GPOEntry.GpoCategory
#GpoSettings = $GPOEntry.GpoSettings
Count = 0
Settings = $null
}
[Array] $CreateGPO['Settings'] = foreach ($Folder in $GPO.DataSet) {
foreach ($Location in $Folder.Location) {
[PSCustomObject] @{
DestinationPath = $Location.DestinationPath
SecuritySID = $Location.SecurityGroup.SID.'#text'
SecurityName = $Location.SecurityGroup.Name.'#text'
GrantExclusiveRights = if ($Folder.GrantExclusiveRights -eq 'true') { $true } else { $false }
MoveContents = if ($Folder.MoveContents -eq 'true') { $true } else { $false }
FollowParent = if ($Folder.FollowParent -eq 'true') { $true } else { $false }
ApplyToDownLevel = if ($Folder.ApplyToDownLevel -eq 'true') { $true } else { $false }
DoNotCare = if ($Folder.DoNotCare -eq 'true') { $true } else { $false }
RedirectToLocal = if ($Folder.RedirectToLocal -eq 'true') { $true } else { $false }
PolicyRemovalBehavior = $Folder.PolicyRemovalBehavior # : LeaveContents
ConfigurationControl = if ($Folder.ConfigurationControl -eq 'GP') { 'Group Policy' } else { $Folder.ConfigurationControl } # : GP
PrimaryComputerEvaluation = $Folder.PrimaryComputerEvaluation # : PrimaryComputerPolicyDisabled
}
}
}
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
$CreateGPO['Linked'] = $GPO.Linked
$CreateGPO['LinksCount'] = $GPO.LinksCount
$CreateGPO['Links'] = $GPO.Links
[PSCustomObject] $CreateGPO
} else {
foreach ($Folder in $GPO.DataSet) {
foreach ($Location in $Folder.Location) {
$CreateGPO = [ordered]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
Id = $Folder.Id
DestinationPath = $Location.DestinationPath
SecuritySID = $Location.SecurityGroup.SID.'#text'
SecurityName = $Location.SecurityGroup.Name.'#text'
GrantExclusiveRights = if ($Folder.GrantExclusiveRights -eq 'true') { $true } else { $false }
MoveContents = if ($Folder.MoveContents -eq 'true') { $true } else { $false }
FollowParent = if ($Folder.FollowParent -eq 'true') { $true } else { $false }
ApplyToDownLevel = if ($Folder.ApplyToDownLevel -eq 'true') { $true } else { $false }
DoNotCare = if ($Folder.DoNotCare -eq 'true') { $true } else { $false }
RedirectToLocal = if ($Folder.RedirectToLocal -eq 'true') { $true } else { $false }
PolicyRemovalBehavior = $Folder.PolicyRemovalBehavior # : LeaveContents
ConfigurationControl = if ($Folder.ConfigurationControl -eq 'GP') { 'Group Policy' } else { $Folder.ConfigurationControl } # : GP
PrimaryComputerEvaluation = $Folder.PrimaryComputerEvaluation # : PrimaryComputerPolicyDisabled
Linked = $GPO.Linked
LinksCount = $GPO.LinksCount
Links = $GPO.Links
}
[PSCustomObject] $CreateGPO
}
}
}
}
+44
View File
@@ -0,0 +1,44 @@
function ConvertTo-XMLWindowsFirewall {
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
[switch] $SingleObject
)
if ($SingleObject) {
$CreateGPO = [ordered]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
#GpoCategory = $GPOEntry.GpoCategory
#GpoSettings = $GPOEntry.GpoSettings
Count = 0
Settings = $null
}
[Array] $CreateGPO['Settings'] = foreach ($Policy in $GPO.DataSet) {
[PSCustomObject] @{
Name = $Policy.LocalName
Version = $Policy.PolicyVersion.Value
}
}
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
$CreateGPO['Linked'] = $GPO.Linked
$CreateGPO['LinksCount'] = $GPO.LinksCount
$CreateGPO['Links'] = $GPO.Links
[PSCustomObject] $CreateGPO
} else {
foreach ($Policy in $GPO.DataSet) {
[PSCustomObject]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
Name = $Policy.LocalName
Version = $Policy.PolicyVersion.Value
Linked = $GPO.Linked
LinksCount = $GPO.LinksCount
Links = $GPO.Links
}
}
}
}
@@ -0,0 +1,56 @@
function ConvertTo-XMLWindowsFirewallConnectionSecurityAuthentiation {
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
[switch] $SingleObject
)
if ($SingleObject) {
$CreateGPO = [ordered]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
#GpoCategory = $GPOEntry.GpoCategory
#GpoSettings = $GPOEntry.GpoSettings
Count = 0
Settings = $null
}
[Array] $CreateGPO['Settings'] = foreach ($Connection in $GPO.DataSet) {
[PSCustomObject] @{
Name = $Connection.LocalName
Version = $Connection.Version
ConnectionGUID = $Connection.GUID
Method = $Connection.AuthenticationSuites.Method #: MachineCert
CAName = $Connection.AuthenticationSuites.CAName #: DC = xyz, DC = evotec, DC = ad, CN = ad-ADCS-CA
CertAccountMapping = if ($Connection.AuthenticationSuites.CertAccountMapping -eq 'true') { $true } elseif ($Connection.AuthenticationSuites.CertAccountMapping -eq 'false') { $false } else { $Connection.AuthenticationSuites.CertAccountMapping }
ExcludeCAName = if ($Connection.AuthenticationSuites.ExcludeCAName -eq 'true') { $true } elseif ($Connection.AuthenticationSuites.ExcludeCAName -eq 'false') { $false } else { $Connection.AuthenticationSuites.ExcludeCAName }
HealthCert = if ($Connection.AuthenticationSuites.HealthCert -eq 'true') { $true } elseif ($Connection.AuthenticationSuites.HealthCert -eq 'false') { $false } else { $Connection.AuthenticationSuites.HealthCert }
}
}
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
$CreateGPO['Linked'] = $GPO.Linked
$CreateGPO['LinksCount'] = $GPO.LinksCount
$CreateGPO['Links'] = $GPO.Links
[PSCustomObject] $CreateGPO
} else {
foreach ($Connection in $GPO.DataSet) {
[PSCustomObject]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
Name = $Connection.LocalName
Version = $Connection.Version
ConnectionGUID = $Connection.GUID
Method = $Connection.AuthenticationSuites.Method #: MachineCert
CAName = $Connection.AuthenticationSuites.CAName #: DC = xyz, DC = evotec, DC = ad, CN = ad-ADCS-CA
CertAccountMapping = if ($Connection.AuthenticationSuites.CertAccountMapping -eq 'true') { $true } elseif ($Connection.AuthenticationSuites.CertAccountMapping -eq 'false') { $false } else { $Connection.AuthenticationSuites.CertAccountMapping }
ExcludeCAName = if ($Connection.AuthenticationSuites.ExcludeCAName -eq 'true') { $true } elseif ($Connection.AuthenticationSuites.ExcludeCAName -eq 'false') { $false } else { $Connection.AuthenticationSuites.ExcludeCAName }
HealthCert = if ($Connection.AuthenticationSuites.HealthCert -eq 'true') { $true } elseif ($Connection.AuthenticationSuites.HealthCert -eq 'false') { $false } else { $Connection.AuthenticationSuites.HealthCert }
Linked = $GPO.Linked
LinksCount = $GPO.LinksCount
Links = $GPO.Links
}
}
}
}
@@ -0,0 +1,66 @@
function ConvertTo-XMLWindowsFirewallProfile {
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
[switch] $SingleObject
)
if ($SingleObject) {
$CreateGPO = [ordered]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
#GpoCategory = $GPOEntry.GpoCategory
#GpoSettings = $GPOEntry.GpoSettings
Count = 0
Settings = $null
}
[Array] $CreateGPO['Settings'] = foreach ($Profile in $GPO.DataSet) {
[PSCustomObject] @{
Profile = $Profile.LocalName
EnableFirewall = if ($Profile.EnableFirewall.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
AllowLocalIPsecPolicyMerge = if ($Profile.AllowLocalIPsecPolicyMerge.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
AllowLocalPolicyMerge = if ($Profile.AllowLocalPolicyMerge.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
DefaultInboundAction = if ($Profile.DefaultInboundAction.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
DefaultOutboundAction = if ($Profile.DefaultOutboundAction.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
DisableNotifications = if ($Profile.DisableNotifications.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
DisableUnicastResponsesToMulticastBroadcast = if ($Profile.DisableUnicastResponsesToMulticastBroadcast.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
DoNotAllowExceptions = if ($Profile.DoNotAllowExceptions.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
LogFilePath = if ($Profile.LogFilePath.Value) { $Profile.LogFilePath.Value } else { 'Not configured' }
LogDroppedPackets = if ($Profile.LogDroppedPackets.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
LogFileSize = if ($Profile.LogFileSize.Value) { $Profile.LogFileSize.Value } else { 'Not configured' }
LogSuccessfulConnections = if ($Profile.LogSuccessfulConnections.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
}
}
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
$CreateGPO['Linked'] = $GPO.Linked
$CreateGPO['LinksCount'] = $GPO.LinksCount
$CreateGPO['Links'] = $GPO.Links
[PSCustomObject] $CreateGPO
} else {
foreach ($Profile in $GPO.DataSet) {
[PSCustomObject]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
Profile = $Profile.LocalName
EnableFirewall = if ($Profile.EnableFirewall.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
AllowLocalIPsecPolicyMerge = if ($Profile.AllowLocalIPsecPolicyMerge.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
AllowLocalPolicyMerge = if ($Profile.AllowLocalPolicyMerge.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
DefaultInboundAction = if ($Profile.DefaultInboundAction.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
DefaultOutboundAction = if ($Profile.DefaultOutboundAction.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
DisableNotifications = if ($Profile.DisableNotifications.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
DisableUnicastResponsesToMulticastBroadcast = if ($Profile.DisableUnicastResponsesToMulticastBroadcast.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
DoNotAllowExceptions = if ($Profile.DoNotAllowExceptions.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
LogFilePath = if ($Profile.LogFilePath.Value) { $Profile.LogFilePath.Value } else { 'Not configured' }
LogDroppedPackets = if ($Profile.LogDroppedPackets.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
LogFileSize = if ($Profile.LogFileSize.Value) { $Profile.LogFileSize.Value } else { 'Not configured' }
LogSuccessfulConnections = if ($Profile.LogSuccessfulConnections.Value -eq 'true') { 'Yes' } elseif ($Profile.EnableFirewall.Value -eq 'false') { 'No' } else { 'Not configured' }
Linked = $GPO.Linked
LinksCount = $GPO.LinksCount
Links = $GPO.Links
}
}
}
}
@@ -0,0 +1,133 @@
function ConvertTo-XMLWindowsFirewallRules {
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
[switch] $SingleObject
)
if ($SingleObject) {
$CreateGPO = [ordered]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
#GpoCategory = $GPOEntry.GpoCategory
#GpoSettings = $GPOEntry.GpoSettings
Count = 0
Settings = $null
}
[Array] $CreateGPO['Settings'] = foreach ($Rule in $GPO.DataSet) {
[PSCustomObject] @{
Version = $Rule.Version
Type = if ($Rule.Dir -eq 'In') { 'Inbound' } elseif ($Rule.Dir -eq 'Out') { 'Outbound' } else { $Rule.Dir }
Name = $Rule.Name
Action = $Rule.Action
Enabled = if ($Rule.Active -eq 'true') { $true } else { $false }
Profile = $Rule.Profile
Svc = $Rule.Svc
LocalAddressIPv4 = $Rule.LA4
LocalAddressIPv6 = $Rule.LA6
RemoteAddressIPV4 = $Rule.RA4
RemoteAddressIPV6 = $Rule.RA6
LocalPort = $Rule.LPort
RemotePort = $Rule.RPort
Description = $Rule.Desc
EmbedCtxt = $Rule.EmbedCtxt
Edge = $Rule.Edge
IFType = $Rule.IFType
Security = $Rule.Security
App = $Rule.App
Protocol = $Rule.Protocol
RMAuth = $Rule.RMAuth
RUAuth = $Rule.RUAuth
ICMP4 = $Rule.ICMP4
LocalName = $Rule.LocalName
}
}
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
$CreateGPO['Linked'] = $GPO.Linked
$CreateGPO['LinksCount'] = $GPO.LinksCount
$CreateGPO['Links'] = $GPO.Links
[PSCustomObject] $CreateGPO
} else {
foreach ($Rule in $GPO.DataSet) {
[PSCustomObject]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
Version = $Rule.Version
Type = if ($Rule.Dir -eq 'In') { 'Inbound' } elseif ($Rule.Dir -eq 'Out') { 'Outbound' } else { $Rule.Dir }
Name = $Rule.Name
Action = $Rule.Action
Enabled = if ($Rule.Active -eq 'true') { $true } else { $false }
Profile = $Rule.Profile
Svc = $Rule.Svc
LocalAddressIPv4 = $Rule.LA4
LocalAddressIPv6 = $Rule.LA6
RemoteAddressIPV4 = $Rule.RA4
RemoteAddressIPV6 = $Rule.RA6
LocalPort = $Rule.LPort
RemotePort = $Rule.RPort
Description = $Rule.Desc
EmbedCtxt = $Rule.EmbedCtxt
Edge = $Rule.Edge
IFType = $Rule.IFType
Security = $Rule.Security
App = $Rule.App
Protocol = $Rule.Protocol
RMAuth = $Rule.RMAuth
RUAuth = $Rule.RUAuth
ICMP4 = $Rule.ICMP4
LocalName = $Rule.LocalName
Linked = $GPO.Linked
LinksCount = $GPO.LinksCount
Links = $GPO.Links
}
}
}
}
<#
Version : 2.30
Action : Allow
Name : @%SystemRoot%\system32\firewallapi.dll,-37303
Dir : In
App : %SystemRoot%\system32\svchost.exe
Svc : dnscache
Profile : Public
RA4 : LocalSubnet
RA6 : LocalSubnet
LPort : 5353
Protocol : 17
Desc : @%SystemRoot%\system32\firewallapi.dll,-37304
Active : true
EmbedCtxt : @%SystemRoot%\system32\firewallapi.dll,-37302
Version : 2.30
Action : Allow
Name : TEST APP
Dir : In
App : C:\Test\exe.exe
Active : true
Version : 2.30
Action : Block
Name : Blo
Dir : Out
App : dfdff
Active : true
Version : 2.30
Action : Block
Name : @FirewallAPI.dll,-36012
Dir : Out
App : %SystemRoot%\system32\svchost.exe
Svc : Qwave
Profile : {Private, Public}
RPort : 2177
Protocol : 17
Desc : @FirewallAPI.dll,-36013
Active : true
EmbedCtxt : @FirewallAPI.dll,-36001
#>
@@ -0,0 +1,76 @@
function ConvertTo-XMLWindowsFirewallSecurityRules {
[cmdletBinding()]
param(
[PSCustomObject] $GPO,
[switch] $SingleObject
)
if ($SingleObject) {
$CreateGPO = [ordered]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
#GpoCategory = $GPOEntry.GpoCategory
#GpoSettings = $GPOEntry.GpoSettings
Count = 0
Settings = $null
}
[Array] $CreateGPO['Settings'] = foreach ($Rule in $GPO.DataSet) {
[PSCustomObject] @{
Version = $Rule.Version
Name = $Rule.Name
Action = $Rule.Action
Enabled = if ($Rule.Active -eq 'true') { $true } else { $false }
Auth1Set = $Rule.Auth1Set
Auth2Set = $Rule.Auth2Set
Crypto2Set = $Rule.Crypto2Set
Description = $Rule.Desc
}
}
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
$CreateGPO['Linked'] = $GPO.Linked
$CreateGPO['LinksCount'] = $GPO.LinksCount
$CreateGPO['Links'] = $GPO.Links
[PSCustomObject] $CreateGPO
} else {
foreach ($Rule in $GPO.DataSet) {
[PSCustomObject]@{
DisplayName = $GPO.DisplayName
DomainName = $GPO.DomainName
GUID = $GPO.GUID
GpoType = $GPO.GpoType
Version = $Rule.Version
Name = $Rule.Name
Action = $Rule.Action
Enabled = if ($Rule.Active -eq 'true') { $true } else { $false }
Auth1Set = $Rule.Auth1Set
Auth2Set = $Rule.Auth2Set
Crypto2Set = $Rule.Crypto2Set
Description = $Rule.Desc
Linked = $GPO.Linked
LinksCount = $GPO.LinksCount
Links = $GPO.Links
}
}
}
}
<#
Version : 2.30
Action : Boundary
Name : TeST Aut
Auth1Set : {E5A5D32A-4BCE-4e4d-B07F-4AB1BA7E5FE3}
Auth2Set : {E5A5D32A-4BCE-4e4d-B07F-4AB1BA7E5FE4}
Crypto2Set : {E5A5D32A-4BCE-4e4d-B07F-4AB1BA7E5FE2}
Desc :
Active : true
Version : 2.30
Action : Boundary
Name : CA TEST
Auth1Set : {0E3A2DDC-F31B-42B5-BEAC-890752F9C0BB}
Auth2Set : EmptySet
Crypto2Set : {E5A5D32A-4BCE-4e4d-B07F-4AB1BA7E5FE2}
Desc :
Active : true
#>
+58 -30
View File
@@ -12,6 +12,10 @@
[string[]] $Type,
[System.Collections.IDictionary] $LinksSummaryCache
)
$DisplayName = $XMLContent.GPO.Name
$DomainName = $XMLContent.GPO.Identifier.Domain.'#text'
if ($LinksSummaryCache) {
$SearchGUID = -join ($XMLContent.GPO.Identifier.Domain.'#text', $XMLContent.GPO.Identifier.Identifier.InnerText -replace '{' -replace '}')
if ($LinksSummaryCache[$SearchGUID]) {
@@ -73,7 +77,7 @@
} elseif ($XMLContent.GPO.Computer.Enabled -eq 'True') {
$ComputerEnabled = $true
} else {
Write-Warning "Get-XMLGPO - Computer enabled not set to true or false. Weird."
Write-Warning "Get-XMLGPO - Computer enabled not set to true or false [$DisplayName/$DomainName]. Weird."
$ComputerEnabled = $null
}
if ($XMLContent.GPO.User.Enabled -eq 'False') {
@@ -81,7 +85,7 @@
} elseif ($XMLContent.GPO.User.Enabled -eq 'True') {
$UserEnabled = $true
} else {
Write-Warning "Get-XMLGPO - User enabled not set to true or false. Weird."
Write-Warning "Get-XMLGPO - User enabled not set to true or false [$DisplayName/$DomainName] . Weird."
$UserEnabled = $null
}
# Translate Enabled to same as GPO GUI
@@ -100,8 +104,8 @@
}
# This is kind of old way of doing things, but it's superseded by other way below
$ComputerSettingsAvailable = if ($null -eq $XMLContent.GPO.Computer.ExtensionData) { $false } else { $true }
$UserSettingsAvailable = if ($null -eq $XMLContent.GPO.User.ExtensionData) { $false } else { $true }
[bool] $ComputerSettingsAvailable = if ($null -eq $XMLContent.GPO.Computer.ExtensionData) { $false } else { $true }
[bool] $UserSettingsAvailable = if ($null -eq $XMLContent.GPO.User.ExtensionData) { $false } else { $true }
if ($ComputerSettingsAvailable -eq $false -and $UserSettingsAvailable -eq $false) {
$NoSettings = $true
@@ -112,35 +116,58 @@
# $OutputUser = $XMLContent.GPO.User.ExtensionData.Extension | Where-Object { $_.PSObject.Properties.TypeNameOfValue -in 'System.Xml.XmlElement', 'System.Object[]' }
# $OutputComputer = $XMLContent.GPO.Computer.ExtensionData.Extension | Where-Object { $_.PSObject.Properties.TypeNameOfValue -in 'System.Xml.XmlElement', 'System.Object[]' }
$OutputUser = foreach ($ExtensionType in $XMLContent.GPO.User.ExtensionData.Extension) {
if ($ExtensionType) {
$GPOSettingTypeSplit = ($ExtensionType.type -split ':')
try {
$KeysToLoop = $ExtensionType | Get-Member -MemberType Properties -ErrorAction Stop | Where-Object { $_.Name -notin 'type', $GPOSettingTypeSplit[0] -and $_.Name -notin @('Blocked') }
} catch {
Write-Warning "Get-XMLGPO - things went sideways $($_.Exception.Message)"
continue
}
# This is additional check we do for error check to prevent false-positives for EMPTY on non-english language
$PreCheckOutputUser = $false
$PreCheckOutputComputer = $false
foreach ($Extension in $XMLContent.GPO.User.ExtensionData) {
if ($Extension.Error) {
$PreCheckOutputUser = $true
}
$KeysToLoop
}
$OutputComputer = foreach ($ExtensionType in $XMLContent.GPO.Computer.ExtensionData.Extension) {
if ($ExtensionType) {
$GPOSettingTypeSplit = ($ExtensionType.type -split ':')
try {
$KeysToLoop = $ExtensionType | Get-Member -MemberType Properties -ErrorAction Stop | Where-Object { $_.Name -notin 'type', $GPOSettingTypeSplit[0] -and $_.Name -notin @('Blocked') }
} catch {
Write-Warning "Get-XMLGPO - things went sideways $($_.Exception.Message)"
continue
}
foreach ($Extension in $XMLContent.GPO.Computer.ExtensionData) {
if ($Extension.Error) {
$PreCheckOutputComputer = $true
}
$KeysToLoop
}
if ($PreCheckOutputComputer -eq $true -or $PreCheckOutputUser -eq $true) {
# in some cases GPResult seems to return an error - this was first noticed by user when using Dutch based system
# I am not sure if it's possible to fix this error for users, but once that happens checking if GPO is empty fails using the method below
# therefore we will use the old method of assuming something is empty or not empty in such case
Write-Warning "Get-XMLGPO - Reading GPO content [$DisplayName/$DomainName] returned an error. This may be because of non-english language. Assesing EMPTY using old method which can report false positives. Be careful please."
$OutputUser = @()
$OutputComputer = @()
} else {
[Array] $OutputUser = foreach ($ExtensionType in $XMLContent.GPO.User.ExtensionData.Extension) {
if ($ExtensionType) {
$GPOSettingTypeSplit = ($ExtensionType.type -split ':')
try {
$KeysToLoop = $ExtensionType | Get-Member -MemberType Properties -ErrorAction Stop | Where-Object { $_.Name -notin 'type', $GPOSettingTypeSplit[0] -and $_.Name -notin @('Blocked') }
} catch {
Write-Warning "Get-XMLGPO - things went sideways [$DisplayName/$DomainName]. Error $($_.Exception.Message)"
continue
}
}
$KeysToLoop
}
[Array] $OutputComputer = foreach ($ExtensionType in $XMLContent.GPO.Computer.ExtensionData.Extension) {
if ($ExtensionType) {
$GPOSettingTypeSplit = ($ExtensionType.type -split ':')
try {
$KeysToLoop = $ExtensionType | Get-Member -MemberType Properties -ErrorAction Stop | Where-Object { $_.Name -notin 'type', $GPOSettingTypeSplit[0] -and $_.Name -notin @('Blocked') }
} catch {
Write-Warning "Get-XMLGPO - things went sideways [$DisplayName/$DomainName]. Error $($_.Exception.Message)"
continue
}
}
$KeysToLoop
}
[bool] $ComputerSettingsAvailable = if ($OutputComputer.Count -gt 0) { $true } else { $false }
[bool] $UserSettingsAvailable = if ($OutputUser.Count -gt 0) { $true } else { $false }
}
$ComputerSettingsAvailable = if ($OutputComputer) { $true } else { $false }
$UserSettingsAvailable = if ($OutputUser) { $true } else { $false }
if (-not $ComputerSettingsAvailable -and -not $UserSettingsAvailable) {
if ($ComputerSettingsAvailable -eq $false -and $UserSettingsAvailable -eq $false) {
$Empty = $true
} else {
$Empty = $false
@@ -277,8 +304,8 @@
'UserSettingsAvailable' = $UserSettingsAvailable
#'ComputerSettingsAvailableReal' = $ComputerSettingsAvailableReal
#'UserSettingsAvailableReal' = $UserSettingsAvailableReal
'ComputerSettingsTypes' = $OutputComputer.Name
'UserSettingsTypes' = $OutputUser.Name
'ComputerSettingsTypes' = $OutputComputer.Name -join ", "
'UserSettingsTypes' = $OutputUser.Name -join ", "
'ComputerEnabled' = $ComputerEnabled
'UserEnabled' = $UserEnabled
'ComputerSettingsStatus' = if ($XMLContent.GPO.Computer.VersionDirectory -eq 0 -and $XMLContent.GPO.Computer.VersionSysvol -eq 0) { "NeverModified" } else { "Modified" }
@@ -288,6 +315,7 @@
'UserSettingsVersionIdentical' = if ($XMLContent.GPO.User.VersionDirectory -eq $XMLContent.GPO.User.VersionSysvol) { $true } else { $false }
'UserSettings' = $XMLContent.GPO.User.ExtensionData.Extension
'NoSettings' = $NoSettings
'Description' = $GPO.Description
'CreationTime' = [DateTime] $XMLContent.GPO.CreatedTime
'ModificationTime' = [DateTime] $XMLContent.GPO.ModifiedTime
'ReadTime' = [DateTime] $XMLContent.GPO.ReadTime
+190 -79
View File
@@ -1,5 +1,5 @@
$Script:GPODitionary = [ordered] @{
AccountPolicies = [ordered] @{
AccountPolicies = [ordered] @{
Types = @(
@{
Category = 'SecuritySettings'
@@ -14,7 +14,7 @@
ConvertTo-XMLAccountPolicy -GPO $GPO -SingleObject
}
}
Audit = [ordered] @{
Audit = [ordered] @{
Types = @(
@{
Category = 'SecuritySettings'
@@ -36,7 +36,7 @@
ConvertTo-XMLAudit -GPO $GPO -SingleObject
}
}
Autologon = [ordered] @{
Autologon = [ordered] @{
# We want to process this based on other report called RegistrySettings
# This is because registry settings can be stored in Collections or nested within other registry settings
# The original function ConvertTo-XMLRegistryAutologon was processing it in limited ordered and potentially would skip some entries.
@@ -50,7 +50,7 @@
ConvertTo-XMLRegistryAutologonOnReport -GPO $GPO
}
}
AutoPlay = @{
AutoPlay = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -65,7 +65,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/AutoPlay Policies*' -SingleObject
}
}
Biometrics = @{
Biometrics = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -78,7 +78,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Biometrics*'
}
}
Bitlocker = @{
Bitlocker = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -95,7 +95,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/BitLocker Drive Encryption*' -SingleObject
}
}
ControlPanel = [ordered]@{
ControlPanel = [ordered]@{
Types = @(
@{
Category = 'RegistrySettings'
@@ -110,7 +110,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel' -SingleObject
}
}
ControlPanelAddRemove = [ordered]@{
ControlPanelAddRemove = [ordered]@{
Types = @(
@{
Category = 'RegistrySettings'
@@ -125,7 +125,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel/Add or Remove Programs' -SingleObject
}
}
ControlPanelDisplay = [ordered]@{
ControlPanelDisplay = [ordered]@{
Types = @(
@{
Category = 'RegistrySettings'
@@ -140,7 +140,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel/Display' -SingleObject
}
}
ControlPanelPersonalization = [ordered]@{
ControlPanelPersonalization = [ordered]@{
Types = @(
@{
Category = 'RegistrySettings'
@@ -155,7 +155,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel/Personalization' -SingleObject
}
}
ControlPanelPrinters = [ordered]@{
ControlPanelPrinters = [ordered]@{
Types = @(
@{
Category = 'RegistrySettings'
@@ -170,7 +170,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel/Printers' -SingleObject
}
}
ControlPanelPrograms = [ordered]@{
ControlPanelPrograms = [ordered]@{
Types = @(
@{
Category = 'RegistrySettings'
@@ -185,7 +185,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel/Programs' -SingleObject
}
}
ControlPanelRegional = [ordered]@{
ControlPanelRegional = [ordered]@{
Types = @(
@{
Category = 'RegistrySettings'
@@ -200,7 +200,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Control Panel/Regional and Language Options' -SingleObject
}
}
CredentialsDelegation = @{
CredentialsDelegation = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -215,7 +215,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Credentials Delegation*' -SingleObject
}
}
CustomInternationalSettings = [ordered]@{
CustomInternationalSettings = [ordered]@{
Types = @(
@{
Category = 'RegistrySettings'
@@ -230,7 +230,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Custom International Settings*' -SingleObject
}
}
Desktop = @{
Desktop = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -245,7 +245,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Desktop*' -SingleObject
}
}
DnsClient = @{
DnsClient = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -260,7 +260,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Network/DNS Client*' -SingleObject
}
}
DriveMapping = [ordered] @{
DriveMapping = [ordered] @{
Types = @(
@{
Category = 'DriveMapSettings'
@@ -275,7 +275,7 @@
ConvertTo-XMLDriveMapSettings -GPO $GPO -SingleObject
}
}
EventLog = [ordered] @{
EventLog = [ordered] @{
Types = @(
@{
Category = 'SecuritySettings'
@@ -290,7 +290,7 @@
ConvertTo-XMLEventLog -GPO $GPO
}
}
EventForwarding = @{
EventForwarding = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -305,7 +305,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Event Forwarding*' -SingleObject
}
}
EventLogService = @{
EventLogService = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -320,7 +320,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Event Log Service*' -SingleObject
}
}
FileExplorer = @{
FileExplorer = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -335,7 +335,22 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/File Explorer*' -SingleObject
}
}
FolderRedirection = @{
FolderRedirection = @{
Types = @(
@{
Category = 'FolderRedirectionSettings'
Settings = 'Folder'
}
)
GPOPath = 'Windows Settings -> Folder Redirection'
Code = {
ConvertTo-XMLFolderRedirection -GPO $GPO
}
CodeSingle = {
ConvertTo-XMLFolderRedirection -GPO $GPO -SingleObject
}
}
FolderRedirectionPolicy = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -350,7 +365,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Folder Redirection' -SingleObject
}
}
FSLogix = @{
FSLogix = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -365,7 +380,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'FSLogix' -SingleObject
}
}
GoogleChrome = @{
GoogleChrome = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -384,7 +399,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Google Chrome', 'Google/Google Chrome', 'Google Chrome - Default Settings (users can override)' -SingleObject
}
}
GroupPolicy = @{
GroupPolicy = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -399,7 +414,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Group Policy*' -SingleObject
}
}
InternetCommunicationManagement = @{
InternetCommunicationManagement = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -414,7 +429,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Internet Communication Management*' -SingleObject
}
}
InternetExplorer = @{
InternetExplorer = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -429,7 +444,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Internet Explorer*', 'Composants Windows/Celle Internet Explorer' -SingleObject
}
}
InternetExplorerZones = [ordered] @{
InternetExplorerZones = [ordered] @{
ByReports = @(
@{
Report = 'RegistrySettings'
@@ -440,7 +455,7 @@
ConvertTo-XMLRegistryInternetExplorerZones -GPO $GPO
}
}
KDC = @{
KDC = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -455,7 +470,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/KDC' -SingleObject
}
}
LAPS = @{
LAPS = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -470,7 +485,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'LAPS' -SingleObject
}
}
Lithnet = @{
Lithnet = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -486,7 +501,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Lithnet/Password Protection for Active Directory*' -SingleObject
}
}
LocalUsers = [ordered] @{
LocalUsers = [ordered] @{
Types = @(
@{
Category = 'LugsSettings'
@@ -501,7 +516,7 @@
ConvertTo-XMLLocalUser -GPO $GPO -SingleObject
}
}
LocalGroups = [ordered] @{
LocalGroups = [ordered] @{
Types = @(
@{
Category = 'LugsSettings'
@@ -516,7 +531,7 @@
ConvertTo-XMLLocalGroups -GPO $GPO -SingleObject
}
}
Logon = @{
Logon = @{
Types = @(
@{ Category = 'RegistrySettings'; Settings = 'Policy' }
)
@@ -528,7 +543,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Logon*' -SingleObject
}
}
MicrosoftOutlook2002 = @{
MicrosoftOutlook2002 = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -543,7 +558,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Microsoft Outlook 2002*' -SingleObject
}
}
MicrosoftEdge = @{
MicrosoftEdge = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -562,7 +577,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Microsoft Edge*', 'Windows Components/Microsoft Edge', 'Windows Components/Edge UI' -SingleObject
}
}
MicrosoftOutlook2003 = @{
MicrosoftOutlook2003 = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -580,7 +595,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Microsoft Office Outlook 2003*', 'Outlook 2003 RPC Encryption' -SingleObject
}
}
MicrosoftOutlook2010 = @{
MicrosoftOutlook2010 = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -595,7 +610,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Microsoft Outlook 2010*' -SingleObject
}
}
MicrosoftOutlook2013 = @{
MicrosoftOutlook2013 = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -610,7 +625,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Microsoft Outlook 2013*' -SingleObject
}
}
MicrosoftOutlook2016 = @{
MicrosoftOutlook2016 = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -625,7 +640,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Microsoft Outlook 2016*' -SingleObject
}
}
MicrosoftManagementConsole = @{
MicrosoftManagementConsole = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -640,7 +655,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Microsoft Management Console*' -SingleObject
}
}
NetMeeting = @{
NetMeeting = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -655,7 +670,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/NetMeeting*' -SingleObject
}
}
MSSLegacy = @{
MSSLegacy = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -670,7 +685,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'MSS (Legacy)' -SingleObject
}
}
MSSecurityGuide = @{
MSSecurityGuide = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -685,7 +700,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'MS Security Guide' -SingleObject
}
}
OneDrive = @{
OneDrive = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -700,7 +715,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/OneDrive*' -SingleObject
}
}
Policies = @{
Policies = @{
Comment = "This isn't really translated"
Types = @(
@{
@@ -716,7 +731,7 @@
ConvertTo-XMLPolicies -GPO $GPO -SingleObject
}
}
Printers = @{
Printers = @{
Types = @(
@{
Category = 'PrintersSettings'
@@ -735,7 +750,7 @@
ConvertTo-XMLPrinter -GPO $GPO -SingleObject
}
}
PrintersPolicies = @{
PrintersPolicies = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -753,7 +768,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Printers*', 'Control Panel/Printers*' -SingleObject
}
}
PublicKeyPoliciesCertificates = [ordered] @{
PublicKeyPoliciesCertificates = [ordered] @{
Types = @(
@{
Category = 'PublicKeySettings'
@@ -805,7 +820,7 @@
}
}
#>
PublicKeyPoliciesAutoEnrollment = [ordered] @{
PublicKeyPoliciesAutoEnrollment = [ordered] @{
Types = @(
@{
Category = 'PublicKeySettings'
@@ -820,7 +835,7 @@
ConvertTo-XMLGenericPublicKey -GPO $GPO -SingleObject
}
}
PublicKeyPoliciesEFS = [ordered] @{
PublicKeyPoliciesEFS = [ordered] @{
Types = @(
@{
Category = 'PublicKeySettings'
@@ -835,7 +850,7 @@
ConvertTo-XMLGenericPublicKey -GPO $GPO -SingleObject
}
}
PublicKeyPoliciesRootCA = [ordered] @{
PublicKeyPoliciesRootCA = [ordered] @{
Types = @(
@{
Category = 'PublicKeySettings'
@@ -850,7 +865,7 @@
ConvertTo-XMLGenericPublicKey -GPO $GPO -SingleObject
}
}
PublicKeyPoliciesEnrollmentPolicy = @{
PublicKeyPoliciesEnrollmentPolicy = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -867,7 +882,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Internet Communication Management*' -SingleObject
}
}
RegistrySetting = [ordered] @{
RegistrySetting = [ordered] @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -882,7 +897,7 @@
ConvertTo-XMLGenericPublicKey -GPO $GPO -SingleObject
}
}
RegistrySettings = [ordered] @{
RegistrySettings = [ordered] @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -897,7 +912,7 @@
ConvertTo-XMLRegistrySettings -GPO $GPO -SingleObject
}
}
OnlineAssistance = @{
OnlineAssistance = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -912,7 +927,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Online Assistance*' -SingleObject
}
}
RemoteAssistance = @{
RemoteAssistance = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -927,7 +942,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Remote Assistance*' -SingleObject
}
}
RemoteDesktopServices = @{
RemoteDesktopServices = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -942,7 +957,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Remote Desktop Services*' -SingleObject
}
}
RSSFeeds = @{
RSSFeeds = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -957,7 +972,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/RSS Feeds*' -SingleObject
}
}
Scripts = [ordered] @{
Scripts = [ordered] @{
Types = @(
@{
Category = 'Scripts'
@@ -972,7 +987,7 @@
ConvertTo-XMLScripts -GPO $GPO -SingleObject
}
}
SecurityOptions = [ordered] @{
SecurityOptions = [ordered] @{
Types = @(
@{
Category = 'SecuritySettings'
@@ -987,7 +1002,7 @@
ConvertTo-XMLSecurityOptions -GPO $GPO -SingleObject
}
}
SoftwareInstallation = [ordered] @{
SoftwareInstallation = [ordered] @{
Types = @(
@{
Category = 'SoftwareInstallationSettings'
@@ -1002,7 +1017,7 @@
ConvertTo-XMLSoftwareInstallation -GPO $GPO -SingleObject
}
}
SystemServices = [ordered] @{
SystemServices = [ordered] @{
Types = @(
@{
Category = 'SecuritySettings'
@@ -1018,7 +1033,7 @@
ConvertTo-XMLSystemServices -GPO $GPO -SingleObject
}
}
SystemServicesNT = [ordered] @{
SystemServicesNT = [ordered] @{
Types = @(
@{
Category = 'ServiceSettings'
@@ -1052,7 +1067,7 @@
}
}
#>
TaskScheduler = [ordered] @{
TaskScheduler = [ordered] @{
Types = @(
@{
Category = 'ScheduledTasksSettings'
@@ -1068,7 +1083,7 @@
ConvertTo-XMLTaskScheduler -GPO $GPO -SingleObject
}
}
TaskSchedulerPolicies = @{
TaskSchedulerPolicies = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -1101,7 +1116,7 @@
}
}
#>
UserRightsAssignment = [ordered] @{
UserRightsAssignment = [ordered] @{
Types = @(
@{
Category = 'SecuritySettings'
@@ -1116,7 +1131,7 @@
ConvertTo-XMLUserRightsAssignment -GPO $GPO -SingleObject
}
}
WindowsDefender = @{
WindowsDefender = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -1131,7 +1146,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Defender*' -SingleObject
}
}
WindowsDefenderExploitGuard = @{
WindowsDefenderExploitGuard = @{
# this needs improvements because of DropDownList
Types = @(
@{
@@ -1147,7 +1162,103 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Microsoft Defender Antivirus/Microsoft Defender Exploit Guard*' -SingleObject
}
}
WindowsHelloForBusiness = @{
# WindowsFirewall = @{
# # Contains only one setting showing version
# Types = @(
# @{
# Category = 'WindowsFirewallSettings'
# Settings = 'GlobalSettings'
# }
# )
# GPOPath = 'Policies -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security'
# Code = {
# ConvertTo-XMLWindowsFirewall -GPO $GPO
# }
# CodeSingle = {
# ConvertTo-XMLWindowsFirewall -GPO $GPO -SingleObject
# }
# }
WindowsFirewallConnectionSecurityRules = @{
Types = @(
@{
Category = 'WindowsFirewallSettings'
Settings = 'ConnectionSecurityRules'
}
)
GPOPath = 'Policies -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security'
Code = {
ConvertTo-XMLWindowsFirewallSecurityRules -GPO $GPO
}
CodeSingle = {
ConvertTo-XMLWindowsFirewallSecurityRules -GPO $GPO -SingleObject
}
}
WindowsFirewallConnectionSecurityAuthentication = @{
Types = @(
@{
Category = 'WindowsFirewallSettings'
Settings = 'Phase1AuthenticationSets'
}
@{
Category = 'WindowsFirewallSettings'
Settings = 'Phase2AuthenticationSets'
}
#@{
# Category = 'WindowsFirewallSettings'
# Settings = 'DefaultPhase1CryptoSet'
#}
)
GPOPath = 'Policies -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security'
Code = {
ConvertTo-XMLWindowsFirewallConnectionSecurityAuthentiation -GPO $GPO
}
CodeSingle = {
ConvertTo-XMLWindowsFirewallConnectionSecurityAuthentiation -GPO $GPO -SingleObject
}
}
WindowsFirewallProfiles = @{
Types = @(
@{
Category = 'WindowsFirewallSettings'
Settings = 'DomainProfile'
}
@{
Category = 'WindowsFirewallSettings'
Settings = 'PublicProfile'
}
@{
Category = 'WindowsFirewallSettings'
Settings = 'PrivateProfile'
}
)
GPOPath = 'Policies -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security'
Code = {
ConvertTo-XMLWindowsFirewallProfile -GPO $GPO
}
CodeSingle = {
ConvertTo-XMLWindowsFirewallProfile -GPO $GPO -SingleObject
}
}
WindowsFirewallRules = @{
Types = @(
@{
Category = 'WindowsFirewallSettings'
Settings = 'InboundFirewallRules'
}
@{
Category = 'WindowsFirewallSettings'
Settings = 'OutboundFirewallRules'
}
)
GPOPath = 'Policies -> Windows Settings -> Security Settings -> Windows Firewall with Advanced Security -> '
Code = {
ConvertTo-XMLWindowsFirewallRules -GPO $GPO
}
CodeSingle = {
ConvertTo-XMLWindowsFirewallRules -GPO $GPO -SingleObject
}
}
WindowsHelloForBusiness = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -1162,7 +1273,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Hello For Business*' -SingleObject
}
}
WindowsInstaller = @{
WindowsInstaller = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -1177,7 +1288,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Installer*' -SingleObject
}
}
WindowsLogon = @{
WindowsLogon = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -1192,7 +1303,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Logon Options*' -SingleObject
}
}
WindowsMediaPlayer = @{
WindowsMediaPlayer = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -1207,7 +1318,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Media Player*' -SingleObject
}
}
WindowsMessenger = @{
WindowsMessenger = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -1222,7 +1333,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Messenger*' -SingleObject
}
}
WindowsPowerShell = @{
WindowsPowerShell = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -1237,7 +1348,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows PowerShell*' -SingleObject
}
}
WindowsRemoteManagement = @{
WindowsRemoteManagement = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -1252,7 +1363,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'Windows Components/Windows Remote Management (WinRM)*' -SingleObject
}
}
WindowsTimeService = @{
WindowsTimeService = @{
Types = @(
@{
Category = 'RegistrySettings'
@@ -1267,7 +1378,7 @@
ConvertTo-XMLGenericPolicy -GPO $GPO -Category 'System/Windows Time Service*' -SingleObject
}
}
WindowsUpdate = @{
WindowsUpdate = @{
Types = @(
@{
Category = 'RegistrySettings'
+4 -1
View File
@@ -144,7 +144,10 @@
# Generate pretty HTML
$TimeLogHTML = Start-TimeLog
Write-Color -Text '[i]', '[HTML ] ', 'Generating HTML report' -Color Yellow, DarkGray, Yellow
if (-not $FilePath) {
$FilePath = Get-FileName -Extension 'html' -Temporary
}
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
+19
View File
@@ -64,6 +64,25 @@ To understand the usage I've created blog post you may find useful
## Changelog
- 0.0.122 - 2021.02.11
- [x] Improved `Invoke-GPOZaurr`
- [x] Report `GPOAnalysis` - added `WindowsFirewallRules`,`WindowsFirewallProfiles`,`WindowsFirewallConnectionSecurityAuthentication`,`WindowsFirewallConnectionSecurityRules`
- [x] Improved `Invoke-GPOZaurrContent` as mentioned above for `GPOAnalysis`
- 0.0.121 - 2021.02.10
- [x] Improvement to `Get-GPOZaurr` - added description [#13](https://github.com/EvotecIT/GPOZaurr/issues/13)
- [x] Improvement to `Invoke-GPOZaurr -Type GPOList` - added description [#13](https://github.com/EvotecIT/GPOZaurr/issues/13)
- [x] Improved `Invoke-GPOZaurr`
- [x] Report GPOAnalysis - added `FolderRedirection`
- [x] Report GPOAnalysis - renamed `FolderRedirection` to `FolderRedirectionPolicy`
- [x] Improved `Invoke-GPOZaurrContent` as mentioned above for `GPOAnalysis`
- 0.0.120 - 2021.02.10
- [x] Improvement to `Get-GPOZaurr` to warn if there is potential issue with EMPTY (which can happen on non-english system)
- [x] In such case GPOZaurr will asses EMPTY or not using old method which doesn't detect all EMPTY cases but shouldn't provide false positives
- 0.0.119
- Broken release - weird
- 0.0.118 - 2021.02.09
- [x] Added information where the report is saved
- [x] Small improvement to `Get-GPOZaurr` to exlicitly define variable types
- 0.0.117 - 2021.02.09
- [x] Small fix to `Get-GPOZaurr` to exclude GPOList.xml which is used in offline mode by `Save-GPOZaurrFiles`
- 0.0.116 - 2021.02.08