Demonstrates VirtualMachine Power operations on multiple Virtual Machines. Works with groups of Virtual Machines all at one time. Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication operation [required] : type of the operation [poweron | poweroff | reset | suspend | reboot | shutdown | standby] datacentername [optional] : name of the datacenter guestid [optional] : guest id of the vm hostname [optional] : name of the host vmname [optional] : name of the virtual machine, use this option to send the power operation to only one virtual machine all [optional] : perform power operations on ALL virtual machines under our control. defaults to false. [true|false] Command Line: run.bat com.vmware.vm.VMPowerOps --url [URLString] --username [User] --password [Password] --operation [Operation] --datacenter [DatacenterName]--guestid [GuestId] --hostname [HostName] --vmname [VMName] --all [true|false]
This sample was originally released as a part of vSphere 6.0 under license terms that contained a provision that disallowed redistribution in source form. In order to encourage growth of community around VMware samples, these samples are being re-released under a commercially friendly open source license (BSD 3-Clause). See the file header for details.
The samples themselves are identical to the official release version with the exception of a changed copyright and license header on each file.
If you wish to run this sample, please download the official SDK from https://my.vmware.com/group/vmware/get-download?downloadGroup=MNGMTSDK600 and follow the provided instructions.