Join two hashtables to make one Join two hashtables to make one powershell powershell

Join two hashtables to make one


Use this expression

$User.GetEnumerator() | Select-Object Key, @{name='Value'; expression={($_.Value -split ", " | Foreach-Object {$Profil[$_]}) -join ", "}}

This basically creates an array of input values, get the values from $Profil for each element and then creates a string from these values.