mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-08-09 18:29:40 +00:00
22 lines
1.0 KiB
PowerShell
22 lines
1.0 KiB
PowerShell
function Select-GPOTranslation {
|
|
[cmdletbInding()]
|
|
param(
|
|
[Parameter(ValueFromPipeline)][System.Collections.IDictionary] $InputObject,
|
|
[string] $Category,
|
|
[string] $Settings
|
|
)
|
|
|
|
$Important = [ordered] @{}
|
|
$AllProperties = Select-Properties -AllProperties -Objects $InputObject.$Category.$Settings
|
|
$MissingProperties = $AllProperties | Where-Object { $_ -notin 'DisplayName', 'DomainName', 'GUID', 'Linked', 'LinksCount', 'Links', 'GPOType', 'GPOCategory', 'GPOSettings' }
|
|
$Types = foreach ($Property in $MissingProperties) {
|
|
($InputObject.$Category.$Settings | Where-Object { $null -ne $_.$Property }).$Property | ForEach-Object {
|
|
($_ | Get-Member -MemberType Properties) | Where-Object { $_.Name -notin 'Length' }
|
|
}
|
|
}
|
|
$Important['AllProperties'] = $AllProperties
|
|
$Important['MissingProperties'] = $MissingProperties
|
|
$Important['Types'] = $Types | Select-Object -Unique
|
|
$Important['Data'] = $InputObject.$Category.$Settings
|
|
$Important
|
|
} |