Skip to content

Commit

Permalink
Added support for SettingDefinitionId
Browse files Browse the repository at this point in the history
  • Loading branch information
ykuijs committed Oct 1, 2024
1 parent 98489d9 commit d8e4681
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Added SettingDefinitionId as a new value to merge items in an array, in addition to UniqueId,
NodeName, Id and Identity

## [0.4.2] - 2024-10-01

### Fixed
Expand Down
1 change: 1 addition & 0 deletions source/Private/Merge-Array.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function Merge-Array
($_.ContainsKey('UniqueId') -and $_.UniqueId -eq $item.UniqueId) -or `
($_.ContainsKey('Identity') -and $_.Identity -eq $item.Identity) -or `
($_.ContainsKey('Id') -and $_.Id -eq $item.Id) -or `
($_.ContainsKey('SettingDefinitionId') -and $_.SettingDefinitionId -eq $item.SettingDefinitionId) -or `
($_.ContainsKey('NodeName') -and $_.NodeName -eq $item.NodeName)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function Convert-M365DSCExportToPowerShellDataFile
$Int_Nodes.ForEach{ $_.Value = [int]$_.Value }

# Sort-object
$Obj_Result = $Obj_Result | Sort-ObjectGraph -PrimaryKey 'NodeName', 'Identity', 'UniqueId' -MaxDepth 20
$Obj_Result = $Obj_Result | Sort-ObjectGraph -PrimaryKey 'NodeName', 'Identity', 'UniqueId', 'SettingDefinitionId' -MaxDepth 20

# Check if data is available
if ($Obj_Result.NonNodeData.$Workload)
Expand Down

0 comments on commit d8e4681

Please sign in to comment.