# Prompts user for username/password and a file path to store the .html output in $strFile = (Read-Host "Enter full path to HTML output file") $strUser = (Read-Host "Enter username for SSH connecting to your ESX servers") $strPassword = (Read-Host "Enter password for connecting") # Defines HEAD information for HTML formatting $head = "`n" # Defines the servers you want to target $servers="esx01","esx02" $myCol = @() # Loops thrue the servers array and runs plink.exe to check for ntpd status and date/time foreach ($server in $servers) { $myObj = "" | Select-Object "HostName", "HostTime", "NTPStatus" $myObj."HostName" = $server $myObj."HostTime" = .\plink.exe -pw $strPassword $strUser@$server "date" $myObj."NTPStatus" = .\plink.exe -pw $strPassword $strUser@$server "/etc/rc.d/init.d/ntpd status" $myCol += $myObj } # Converts array output to HTML $myCol | ConvertTo-Html -Head $head |foreach { if ($_ -like "*