vCheck Daily Report for vSphere

vCheck is a PowerShell HTML framework script, the script is designed to run as a scheduled task before you get into the office to present you with key information via an email directly to your inbox in a nice easily readable format.

This script picks on the key known issues and potential issues scripted as plugins for various technologies written as PowerShell scripts and reports it all in one place so all you do in the morning is check your email.

One of the key things about this report is if there is no issue in a particular place you will not receive that section in the email, for example if there are no data stores with less than 5% free space (configurable) then the disk space section in the virtual infrastructure version of this script, it will not show in the email, this ensures that you have only the information you need in front of you when you get into the office.

This script is not to be confused with an Audit script, although the reporting framework can also be used for auditing scripts too.  I don’t want to remind you that you have 5 hosts and what their names are and how many CPU’s they have each and every day as you don’t want to read that kind of information unless you need it, this script will only tell you about problem areas with your infrastructure.

Download

Prerequisites for vSphere version of vCheck

The following will need to be installed for you to run this script and report on your VMware environment:

  • PowerShell V2
  • PowerCLI 5.01 or later version
  • vCenter 2.5 or later version

Configuring the script

The first time you run this script it will go through a configuration menu, this configuration will be saved and used for all future runs of the script.  If you want to go back through the configuration or you add new plugins to the script then please run the script with the –config parameter as follows:

1
.\vCheck.ps1 –config

Output File

Some people like to save a copy of the HTML for future reference or so they can go back and see when a problem started happening, to do this use the –OutputPath parameter and specify a location where the HTML will be saved, to do this run the script as follows:

1
.\vCheck.ps1 –OutputPath C:\vCheckOutput\DailyReports

Video – How to Run the script

The following video will show how to run the script for the first time and any subsequent runs after this .

Adjusting connection information

In some cases you will need to adjust the connection information used by the connect-viserver cmdlet to connect to your vCenter, this can be adjusted through the config wizard or if extra credentials are needed please edit the 00 Connection Plugin for vCenter.ps1 file in the 00 Initialize folder as below or use the New-VICredentialStoreItem to store connection credentials:

Before

1
$VIConnection = Connect-VIServer $VIServer

After

1
$VIConnection = Connect-VIServer $VIServer –user “AlternateUsername” –Pass “Alternatepassword” –Protocol Https

Send Mail to multiple Email recipients

Edit the Global Variables.ps1 file and replace the line starting $EmailTo to the following:

1
$EmailTo ="user01@example.com,user02@example.com"

Reference