Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Maps in vector and PowerShell
-
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?
-
Hello @Adam,
What you are doing is correct; this is a bug in the Windows extension.
I've filed inedox-windows#76 to fix this.
-
Should this problem already be solved in version 1.7.0? I have this version of the extension installed but the problem still exists.
-
Hi @Adam,
I have pushed an updated extension that includes this fix. The fix is included in the Windows extension 1.0.18+ and 1.7.1+. You should see an update when you check in Administration > Extensions. Please let me know if you have nay issues!
Thanks,
Rich