Quantcast
Channel: VMware Communities : Popular Discussions - VMware Server Archives
Viewing all articles
Browse latest Browse all 69891

Using vmware-cmd for scripting on Windows hosts: what does it return?

$
0
0

Hello,

 

I'm trying to write an easy to use script for the backup purposes; I use WSH for it. I'd like to use the vmware-cmd for getting the state of my VMs, therefore I would like to know, what does the vmware-cmd return...

 

The following does not work:

 

 

Set wshshell = CreateObject("Wscript.Shell")

comstring = "vmware-cmd " & myVM_vmxFile & " getheartbeat"

 

result = wshshell.run(comstring,0)

 

msgBox result

 

/code

 

The msgBox shows always a null; it doesn't matter which heartbeat the VM currently has...

 

What I'm missing?


Viewing all articles
Browse latest Browse all 69891

Trending Articles