Disclaimer: This is not officially supported by VMware, please use at your own risk. Recently I faced the challenge with a script running on a VCSA which executes some checks and in case something gets detected it has to trigger a vCenter alarm. My solution is to log a user event which will be captured by an vCenter …
Read MoreI would like to receive push messages for triggered alerts from my vCenter. There is the possibility to execute a command when a alert has been triggered so I decided to write a script which will use Prowl to send push notification to my mobile apple device. I used Prowl already for other devices like my Homematic home …
Read MoreThis is a small powershell script to get all Guest IPs from all virtual machines $VCENTER="10.1.1.3" Connect-VIServer -Server $VCENTER $vms = Get-VM | Sort $file = "c:\ip_list.txt" foreach ($vm in $vms){ foreach($ip in $vm.Guest.IpAddress){ Write-Host "$vm $ip" "$vm $ip" | Out-File -FilePath $file -Append } } …
Read MoreThis is small powershell script to upload a file from your local disk to a webdav server. It is also proxy capable. #Complete path of the file to be uploaded $file = "d:\test_file.txt" #URL without the last "/" $url = "https://YOUR-SERVER/webdav" $proxy = "http=PROXY-SERVER:PORT" …
Read MoreI’m using the tool Logwatch to get a daily log report from all my servers by email. Install Logwatch: apt-get update apt-get install logwatch Config file: /usr/share/logwatch/default.conf/logwatch.conf To simplify the access to the config file I use a symlink. cd /etc/logwatch ln -s …
Read MoreI was not quite happy with the statistics from the vCenter. It is not possible to get an overview overall my ESXi servers. 🙁 Someone pointed me to the tool Graphite that this is a cool solution to visualize such kind of statistics. So I decided to give it a try. I created and virtual machine running Centos and Graphite …
Read MoreAfter an short weekend with a minimal of sleep … I’m done my Homelab is up and running. Furthermore I have created an template of an nested ESXi (virtualized ESXi). These nested ESXi are perfect for testing of Powershell scripts which I use to initial configure an new ESXi. Next steps which I have planned is to migrate …
Read MoreUsing this small script it is possible to change the HA settings for multiple virtual machines in an HA cluster. Example: – multiple virtual machines all with Name XXX-console HA restart policy possible values: -HARestartPriority:Low -HARestartPriority:High -HARestartPriority:Disabled -HARestartPriority:Medium …
Read More######################################################################################################## # Steps to use the script: # # 1st: create a folder on an shared datastore # # 2nd: adjust the content of the variable $FolderName to the name of the folder created in step 1 # # 3rd: adjust the content of the …
Read MoreScript to create a report about the VMware Tools status: Sample Output: Total VMs: 527 Total powered on: 474 Total powered off: 53 ToolsOK: 140 ToolsOld: 227 ToolsNotInstalled: 106 DisConnect from Virtual Center Set-PSDebug -Strict $VIServer = "VCENTERIP" Connect-VIServer -server $VIServer -User USERNAME …
Read More