File tree Expand file tree Collapse file tree
src/PSDesiredStateConfiguration Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# v2 Changelog
22
3+ ## [ v2.0.8]
4+
5+ - Fixed an issue with array parameters is key-value pairs (#128 ).
6+ - ConvertTo-MOFInstance: Include resource properties with empty array value (#127 )
7+
38## [ v2.0.7]
49
510### Main changes
Original file line number Diff line number Diff line change 99RootModule = ' PSDesiredStateConfiguration.psm1'
1010
1111# Version number of this module.
12- moduleVersion = ' 2.0.7 '
12+ moduleVersion = ' 2.0.8 '
1313
1414# Supported PSEditions
1515CompatiblePSEditions = @ (' Core' )
Original file line number Diff line number Diff line change @@ -509,7 +509,7 @@ function ConvertTo-MOFInstance
509509 $targetTypeName = $PropertyTypes [$p.Name ].TypeConstraint
510510
511511 # see if the target type is an array
512- $asArray = $p.Name -eq ' DependsOn' -or $targetTypeName -match ' Array'
512+ $asArray = $p.Name -eq ' DependsOn' -or $targetTypeName -match ' Array' -or (( -not [ string ]::IsNullOrEmpty( $targetTypeName )) -and $targetTypeName .EndsWith ( ' [] ' ))
513513
514514 # Convert the CIM typename to the appropriate .NET type to use
515515 # to convert the input object into an appropriately encoded string
@@ -671,10 +671,7 @@ function ConvertTo-MOFInstance
671671 }
672672 else
673673 {
674- if ($targetTypeName -notmatch ' Array' -or $p.Value.Count )
675- {
676- $p.Name + ' = ' + (stringify - value $p.Value - asArray $asArray - targetType $targetType ) + " ;`n "
677- }
674+ $p.Name + ' = ' + (stringify - value $p.Value - asArray $asArray - targetType $targetType ) + " ;`n "
678675 }
679676 }
680677 }
@@ -4211,7 +4208,7 @@ function GetResourceFromKeyword
42114208 Ascending = $true
42124209 }
42134210 $resource.UpdateProperties ($updatedProperties )
4214-
4211+
42154212 $resource | Add-Member - MemberType NoteProperty - Name ' ImplementationDetail' - Value $implementationDetail
42164213
42174214 return $resource
You can’t perform that action at this time.
0 commit comments