Hi,
is there any solution to shutdown ESX-Servers trough vCenter using VI Toolkit?
I have found many things about shutdown virtual machines etc., but about the final shutdown of the host?!
For my VMs I use "Virtual Machine Startup/Shutdown"-Function through the VI Client....
Have you any idea?
You can use the VI Perl Toolkit to do so and here is a script that allows you to shutdown your guests and then the host: http://communities.vmware.com/docs/DOC-9531
If you're looking for something specific in the VI Toolkit for Windows, you may want to try their forum for additional help. There is also a default utility with VI Perl Toolkit hostops.pl which can be used to run various set of tasks against a given host. If you're executing the shutdown from a system that's not hosted on one of your ESX/ESXi host to be shutdown, then that utility can be used and there is a VI Perl Toolkit for Windows as well.
=========================================================================
William Lam
VMware vExpert 2009
Thanks!
I have done this:
$HS = Get-VMHost myesxhost01.example.org | get-view
$HS.ShutdownHost("true")
$HS2 = Get-VMHost myesxhost02.example.org | get-view
$HS2.ShutdownHost("true")
I will test it on Thursday....