Why dont you just do it from the vi client?
If you want to script it, you will have to use the 'vimsh' command. Theres a paper on vimsh commands on xtravirt.
Here's a good guide from Scott Lowe how to accomplish it.
If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!
iGeek Systems LLC.
VMware, Citrix, Microsoft Consultant