So I'm trying to use the Invoke-VMScript cmdlet to do some bash scripting on my VMs. The problem is that I'm working in a vCloud environment and not vSphere. This poses an issue since the Invoke-VMScript cmdlet only accepts VM object as a parameter and the only thing I have close to it is CIVM.
So, is there a way to use Invoke-VMScript cmdlet in a vCloud and is it possible to to convert CIVM to VM in order to pass it to the Invoke-VMScript cmdlet?
I have tried that, it returns an empty value. My guess its because maybe Get-VM isn't working on a vCloud env.
I have tried that, it returns an empty value. My guess its because maybe Get-VM isn't working on a vCloud env.
Does $civm.Name contains the DisplayName of the VM?
If yes, you could try a Get-VM -Name $civm.Name
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thing is I cannot use Get-VM at all since I'm not working within a vSphere environment but vCloud.
For example:
I'm using
I see, then I'm afraid that the answer to your original question is "no, that is not possible".
The Invoke-VMScript cmdlet is based on the GuestOperations APIs, and for those you need an active vCenter connection.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I see. And I suppose there is no alternative to the Invoke-VMScript cmdlet for vCloud? Any workarounds?
Not that I know of I'm afraid.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ok, thanks for your time.