Hi Guys,
consider this simple nested hashtable
$items = @{"First" = @{"Parameter1" = "Value1""Parameter2" = "Value2"
}"Second" = @{"Parameter1" = "Value1""Parameter2" = "Value2"
}
}If I want to pass the values into a function using the splatting (@) operator, I have to use something like this:
foreach($item in $items.GetEnumerator())
{
$currentItem = $item.Value
Write-Host @currentItem
}Do I really need a temp variable (currentItem)? I tryed something like this:
foreach($item in $items.GetEnumerator())
{
Write-Host @item.Value # doesn't work.
Write-Host @($item.Value) # doesn't work.
}