From 72aa8ba1d514b2a93ae372ec7a7625c1acf9fa42 Mon Sep 17 00:00:00 2001 From: Anthony Watherston Date: Mon, 5 Sep 2022 09:03:40 +1000 Subject: [PATCH] Update Get-AssignmentDefinitions.ps1 --- Scripts/Helpers/Get-AssignmentDefinitions.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Scripts/Helpers/Get-AssignmentDefinitions.ps1 b/Scripts/Helpers/Get-AssignmentDefinitions.ps1 index d5815d6a..339a487e 100644 --- a/Scripts/Helpers/Get-AssignmentDefinitions.ps1 +++ b/Scripts/Helpers/Get-AssignmentDefinitions.ps1 @@ -118,7 +118,12 @@ function Get-AssignmentDefinitions { Write-Debug " parameters inherited $($inheritedParameters | ConvertTo-Json -Depth 100)" Write-Debug " parameters at node $($addedParameters | ConvertTo-Json -Depth 100)" foreach ($parameterName in $addedParameters.Keys) { - $parameterValue = Get-DeepClone $addedParameters.$parameterName -AsHashTable + if ($addedParameters.$parameterName -is [array]) { + $parameterValue = $addedParameters.$parameterName + } + else { + $parameterValue = Get-DeepClone $addedParameters.$parameterName -AsHashTable + } if ($inheritedParameters.ContainsKey($parameterName)) { $def.parameters[$parameterName] = $parameterValue }