mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-08-10 18:57:23 +00:00
35 lines
1.7 KiB
PowerShell
35 lines
1.7 KiB
PowerShell
function Get-XMLRegistrySettings {
|
|
[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.RegistrySettings.Registry) {
|
|
[PSCustomObject] @{
|
|
DisplayName = $GPO.DisplayName
|
|
DomainName = $GPO.DomainName
|
|
GUID = $GPO.Guid
|
|
Linked = $LinksInformation.Linked
|
|
LinksCount = $LinksInformation.LinksCount
|
|
Links = $LinksInformation.Links
|
|
GpoType = $Type
|
|
Changed = [DateTime] $Key.changed
|
|
GPOSettingOrder = $Key.GPOSettingOrder
|
|
Hive = $Key.Properties.hive #: HKEY_LOCAL_MACHINE
|
|
Key = $Key.Properties.key #: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
|
|
Name = $Key.Properties.name #: AutoAdminLogon
|
|
Type = $Key.Properties.type #: REG_SZ
|
|
Value = $Key.Properties.value #
|
|
Filters = $Key.Filters
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |