Hi,
I'm trying to convert a powercli script to use workflow (mostly so I can run cloning in parallel). Will I have to wrap every "get-vm" etc in an "inlinescript {}" definition?
-T
I think it might be possible to reuse the session key, as Clinton described in his Multithreading PowerCLI post
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Just to make my point a little clearer, I get this kind of error when calling powercli cmdlets:
Microsoft.PowerShell.Utility\Write-Error : The term 'Get-VM' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name
HTH
That seems to indicate the PowerCLI pssnapin is not loaded.
Did you do a
Add-PSSnapin VMware.VimAutomation.Core
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I suspect LucD is right because each parallel thread in the workflow is it's own powershell session. You'll likely also need to call connect-viserver again.
I think it might be possible to reuse the session key, as Clinton described in his Multithreading PowerCLI post
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
i think i'm getting close