Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


truggeri321
2014-07-22T13:23:05Z
Hi there,

Is it possible to have VisualCron turn off a VMWARE ESXi host? I have looked in the vm tasks and am not familiar with using VisualCron with VMware. It looks like there are many commands for manipulating the guests but not the hosts.

Thanks

Tony
Sponsor
Forum information
Support
2014-07-23T12:37:22Z
You could use the Run command for guest and run:

shutdown -s
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
bbusse
2014-07-25T19:40:46Z
Originally Posted by: truggeri321 

Hi there,

Is it possible to have VisualCron turn off a VMWARE ESXi host? I have looked in the vm tasks and am not familiar with using VisualCron with VMware. It looks like there are many commands for manipulating the guests but not the hosts.

Thanks

Tony



You would likely need to use the VMware PowerCLI and do this via PowerShell task if you want to manipulate the VMware guests or Hosts.

Install on server running VisualCron:
https://my.vmware.com/we...oadGroup=VSP510-PCLI-510 


Powershell Script would look something like this:


Add-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue
Connect-VIServer -Server 'ESX_Host_Name' -User "Username" -Password "Password"
Stop-VMHost


If you use vSphere, you can substitute the 'ESX_HOST_Name' for the name of your vSphere server. But then you'd have to specify 'which' host you want to shutdown and it's very specific. Lets say in the vSphere console, I have a host named "TestESXiHost", to shut that down, it'd be like this:


Add-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue
Connect-VIServer -Server 'vSphere_Server_Name' -User "Username" -Password "Password"
Stop-VMHost TestESXiHost


If the username you use to launch the powershell script has access to vSphere, you do not need to specify the -user and -password options. You'll always need to when connnecting directly to an ESX host though, unless your username/password on windows happens to be root with the same password as the esx host and i REALLY hope it's not :)

Brian


truggeri321
2014-07-25T20:53:19Z
Thank you....this is exactly what I needed.

TR
Scroll to Top