I'm trying to pass to the PowerShell script maps in vector. Unfortunately, instead of the expected array containig hashtable I get an array containing stings. Below I attach a sample configuration plan where you can see the problem.
set @Groups = @(%(key1:val1,key2:val2),%(key1:val3,key2:val4));
foreach %Group in @Groups
{
Log-Information %Group.key1;
Log-Information %Group.key2;
}
Execute-PowerShell >>
foreach ($Group in $Groups)
{
Write-host PowerShellLoop
Write-host $Group
Write-host "IsHastable: $($Group -is [Hashtable])"
}
>>;
How to pass Groups variable so that PowerShell receives array containing hashtable?