Skip to content

Commit

Permalink
fix Rename-M365DSCCimInstanceParameter
Browse files Browse the repository at this point in the history
  • Loading branch information
William-Francillette committed Nov 8, 2023
1 parent 33236cd commit 6db91ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function Rename-M365DSCCimInstanceParameter
$values = @()
foreach ($item in $Properties)
{
$values += Rename-M365DSCCimInstanceParameter $item
$values += Rename-M365DSCCimInstanceParameter $item -KeyMapping $KeyMapping
}
$result = $values

Expand All @@ -76,6 +76,7 @@ function Rename-M365DSCCimInstanceParameter
{
$result = ([Hashtable]$Properties).clone()
}

if ($type -like '*CimInstance*' -or $type -like '*Hashtable*' -or $type -like '*Object*')
{
$hashProperties = Get-M365DSCDRGComplexTypeToHashtable -ComplexObject $result
Expand All @@ -92,7 +93,7 @@ function Rename-M365DSCCimInstanceParameter
if ($null -ne $property)
{
$hashProperties.Remove($key)
$hashProperties.add($keyName, (Rename-M365DSCCimInstanceParameter $property))
$hashProperties.add($keyName, (Rename-M365DSCCimInstanceParameter $property -KeyMapping $KeyMapping))
}
}
$result = $hashProperties
Expand Down

0 comments on commit 6db91ac

Please sign in to comment.