mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-08-07 01:16:03 +00:00
29 lines
1.3 KiB
PowerShell
29 lines
1.3 KiB
PowerShell
function Get-XMLSecurityOptions {
|
|
[cmdletBinding()]
|
|
param(
|
|
[PSCustomObject] $GPO,
|
|
[System.Xml.XmlElement[]] $GPOOutput,
|
|
[string] $Splitter = [System.Environment]::NewLine,
|
|
[switch] $FullObjects
|
|
)
|
|
$LinksInformation = Get-LinksFromXML -GPOOutput $GPOOutput -Splitter $Splitter -FullObjects:$FullObjects
|
|
foreach ($Type in @('User', 'Computer')) {
|
|
if ($GPOOutput.$Type.ExtensionData.Extension) {
|
|
foreach ($ExtensionType in $GPOOutput.$Type.ExtensionData.Extension) {
|
|
foreach ($Key in $ExtensionType.SecurityOptions) {
|
|
[PSCustomObject] @{
|
|
DisplayName = $GPO.DisplayName
|
|
DomainName = $GPO.DomainName
|
|
GUID = $GPO.Guid
|
|
Linked = $LinksInformation.Linked
|
|
LinksCount = $LinksInformation.LinksCount
|
|
Links = $LinksInformation.Links
|
|
GpoType = $Type
|
|
SystemAccessPolicyName = $Key.SystemAccessPolicyName
|
|
SettingNumber = $Key.SettingNumber
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |