From 2f25064090fbcb32c6023d7e9d52487b60836249 Mon Sep 17 00:00:00 2001 From: Przemyslaw Klys Date: Sun, 28 Jun 2020 10:32:02 +0200 Subject: [PATCH] Update --- Private/Invoke-GPOTranslation.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Private/Invoke-GPOTranslation.ps1 b/Private/Invoke-GPOTranslation.ps1 index a3aed9b..379ba70 100644 --- a/Private/Invoke-GPOTranslation.ps1 +++ b/Private/Invoke-GPOTranslation.ps1 @@ -15,11 +15,14 @@ # It's possible given small input of GPOs that I work with that this is not all... and needs updates $AllProperties = Select-Properties -AllProperties -Objects $InputData.$Category.$Settings $MissingProperties = $AllProperties | Where-Object { $_ -notin 'DisplayName', 'DomainName', 'GUID', 'Linked', 'LinksCount', 'Links', 'GPOType', 'GPOCategory', 'GPOSettings' } - foreach ($Property in $MissingProperties) { + [Array] $ConsiderAdding = foreach ($Property in $MissingProperties) { if ($Property -notin $Script:GPODitionary[$Report]['PossibleProperties']) { - Write-Warning "Invoke-Translation - We're missing property for $Category / $Settings - $Property" + $Property } } + if ($ConsiderAdding.Count -gt 0) { + Write-Warning "Invoke-Translation - We're missing property for $Category / $Settings - ($($ConsiderAdding -join ','))" + } # Here we try to translate given GPO entries according to predefined dictionary - so called prettify # Dictionary will need a lot of work and engine some improvements foreach ($GPOEntry in $InputData.$Category.$Settings) {