VMware {code} Community
zrow
Contributor
Contributor

connect to ESX VM from VBScript ( VIX or VmCOM) - Urgent :(

I have a ESX 3.5 Server running few VMs

I have a urgent request to write vbscripts to do switch on a machine "VM-x" remotely, copy a batch file from my local windows XP host to this VM-X and then execute it. I have installed VIX API and VmCOM API. Btw I also have VM Workstation 6.0 on my local machine.

Can some one please send me a very basic VBSCRIPT code to :

1. connect to ESX

2. List the running VMS/ Switch on a VM named "VM-X"

3. Copy a file from local win xp host to this VM-X

I tried few things here and there but no luck :(.

Appreciate your help. Thanks.

0 Kudos
1 Reply
dblock
Enthusiast
Enthusiast

Look at the documentation, there's a VBScript example, for example here: .

Before you start, are you sure you want to use VBScript? You could take VMWareTasks and write much simpler code in C# or use PowerShell with it (example).

0 Kudos