Hi,
As the Title suggests, this is messy.
What we would like use workflow for is:
- take multiple snapshots in vCenter
- make the workflow take parameters
- import the module VMware.VumAutomation
Considering all the rules and restrictions regarding workflows I wonder if this is even possible.
(not taking snapshots in the example, just testing with Get-VM)
workflow VMSnapshot{
Param(
[array]$servers
)
inlinescript
{
Import-Module VMware.VumAutomation
$vCenter = "XXXXXXX.YYY.intra"
Connect-VIServer -server $vCenter
ForEach -Parallel ($item in $servers)
{
Get-VM -Name $item | select name,memorygb
}
}
}
}
VMSnapshot -servers "server1","server2"
----------------
That's the code.
Now I know that you can't use -parallel inside inlinescript. This is just the "pseudo-code" explaining the functionality.
How would one go about to make this work?
Thanks
/Daniel