Whooops, looks like I got a couple of things wrong and I also missed something out that a few people were asking for, You can call this a minor release. I think you should be able to change these yourselves as they are very straight forward and its not worth me re-issuing the script as you would have to change your preferences again which is actually more work !

Request:  Multiple NTP servers

I was asked in V2 if I could change the script to report on multiple ntp servers as some people use multiple time sources for their hosts, here is how you would do that… (I will add this to v4)

On line 62 you will set the current ntp server, it looks like this:

$ntpserver = ntp.MyDomain.com

To use multiple ntp servers add more that one entry separating with the pipe symbol as so:

$ntpserver = ntp1.MyDomain.com|ntp1.MyDomain.com|ntp3.MyDomain.com

Next go to line 809 which currently reads:

$NTPCheck = @($VMH |Where {$_.state-ne Disconnected} |Select Name, @{N=NTPServer;E={$_ |Get-VMHostNtpServer}}, @{N=ServiceRunning;E={(Get-VmHostService -VMHost $_ |Where-Object {$_.key-eq ntpd}).Running}} |Where {$_.ServiceRunning -eq $false -or $_.NTPServer -ne $ntpserver})

The only bit that needs changing is the bit at the end which currently says –ne just change this to –notmatch as below:

$NTPCheck = @($VMH |Where {$_.state-ne Disconnected} |Select Name, @{N=NTPServer;E={$_ |Get-VMHostNtpServer}}, @{N=ServiceRunning;E={(Get-VmHostService -VMHost $_ |Where-Object {$_.key-eq ntpd}).Running}} |Where {$_.ServiceRunning -eq $false -or $_.NTPServer -notmatch $ntpserver})

Error: VM Alarms not working

I forgot to change a variable back after testing something so the Host Alerts section doesn’t actually do anything as it try’s to enumerate a blank object, all you need to do for this one is to change line 872 from the following:

foreach ($VMView in $VMViews){

To the following:

foreach ($VMView in $FullVM){

Sorry for these issues, as I said I will include these fixes in v4 and try and not make any more !