I'm a windows tech by trade and I'm looking at a patching script to download all of the patches via ftp and apply. Thanks \[Dominic Rivera (dominic@vmprofessional.com)]. What I'd like to do is at the top of the script, check to see if the ESX host is in maintenace mode because I don't want anybody patching servers with VMs up and running (obviously most of the patches fail anyhow).
Could someone post a snippet of perl that would check if the host is in maintenance mode, if so echo that it is and break out of the script?
Much appreciated.