mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-09-04 14:45:23 +00:00
Update
This commit is contained in:
+25
-13
@@ -21,6 +21,11 @@
|
||||
'Account'
|
||||
'SystemServices'
|
||||
),
|
||||
|
||||
[Parameter(ParameterSetName = 'Default')]
|
||||
[Parameter(ParameterSetName = 'Local')]
|
||||
[switch] $NoTranslation,
|
||||
|
||||
[Parameter(ParameterSetName = 'Default')]
|
||||
[Parameter(ParameterSetName = 'Local')]
|
||||
[string] $Splitter = [System.Environment]::NewLine,
|
||||
@@ -78,16 +83,6 @@
|
||||
}
|
||||
#>
|
||||
|
||||
$GPODitionary = @{
|
||||
'SecuritySettings' = @{
|
||||
Name = 'Security Settings'
|
||||
Translate = [ordered] @{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#$GPOStoredTypes = Get-XMLGPOTypes -GPOOutput $GPOOutput.GPO
|
||||
|
||||
@@ -101,7 +96,6 @@
|
||||
}
|
||||
$Output["$($D.GpoCategory)"]["$($D.GpoSettings)"].Add($D)
|
||||
}
|
||||
|
||||
<#
|
||||
continue
|
||||
|
||||
@@ -161,5 +155,23 @@
|
||||
}
|
||||
#>
|
||||
}
|
||||
$Output
|
||||
}
|
||||
if ($NoTranslation) {
|
||||
$Output
|
||||
} else {
|
||||
$TranslatedOutput = [ordered] @{}
|
||||
foreach ($Category in $Script:GPODitionary.Keys) {
|
||||
if (-not $TranslatedOutput[$Category]) {
|
||||
$TranslatedOutput[$Category] = [ordered] @{}
|
||||
}
|
||||
foreach ($Setting in $Script:GPODitionary[$Category].Keys) {
|
||||
if (-not $TranslatedOutput[$Category][$Setting]) {
|
||||
$TranslatedOutput[$Category][$Setting] = [ordered] @{}
|
||||
}
|
||||
$TranslatedOutput[$Category][$Setting] = Invoke-GPOTranslation -InputData $Output -Category $Category -Settings $Setting
|
||||
}
|
||||
}
|
||||
$TranslatedOutput
|
||||
}
|
||||
}
|
||||
|
||||
#Select-Properties -AllProperties -Objects ($Output.SecuritySettings.SecurityOptions | Where-Object { $_.Display -ne $null })
|
||||
@@ -0,0 +1,22 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user