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 they 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 datastores 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 there 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.
What’s new in 6.0
vCheck 6.0 has been updated to be more community driven and easier to expand, the checks have been removed and put into separate plugins which make it easier for people to contribute.
The HTML output has been reformatted to work with newer versions of Outlook.
A Setup Wizard has been added for easy setup and no more need to reference the vCenter address as a parameter of the script.
As the plugins have been moved out it makes this HTML report framework easy to adapt to other PowerShell enabled products like VMware vCD, Sharepoint, Exchange, vShield, VMware View, SQL, Active Directory and more. – please contact me if your interested to start your own using this template.
A header image has been added to the HTML report.
And much much more.
What’s Available ?
Currently there is a vCheck report for each of the following:
What is checked for in the vSphere version ?
The following items are included as part of the vCheck vSphere download, they are included as vCheck Plugins and can be removed or altered very easily by editing the specific plugin file which contains the data. vCheck Plugins are found under the Plugins folder.
- General Details
- Number of Hosts
- Number of VMs
- Number of Templates
- Number of Clusters
- Number of Datastores
- Number of Active VMs
- Number of Inactive VMs
- Number of DRS Migrations for the last days
- Snapshots over x Days old
- Datastores with less than x% free space
- VMs created over the last x days
- VMs removed over the last x days
- VMs with No Tools
- VMs with CD-Roms connected
- VMs with Floppy Drives Connected
- VMs with CPU ready over x%
- VMs with over x amount of vCPUs
- List of DRS Migrations
- Hosts in Maintenance Mode
- Hosts in disconnected state
- NTP Server check for a given NTP Name
- NTP Service check
- vmkernel warning messages ov the last x days
- VC Error Events over the last x days
- VC Windows Event Log Errors for the last x days with VMware in the details
- VC VMware Service details
- VMs stored on datastores attached to only one host
- VM active alerts
- Cluster Active Alerts
- If HA Cluster is set to use host datastore for swapfile, check the host has a swapfile location set
- Host active Alerts
- Dead SCSI Luns
- VMs with over x amount of vCPUs
- vSphere check: Slot Sizes
- vSphere check: Outdated VM Hardware (Less than V7)
- VMs in Inconsistent folders (the name of the folder is not the same as the name)
- VMs with high CPU usage
- Guest disk size check
- Host over committing memory check
- VM Swap and Ballooning
- ESXi hosts without Lockdown enabled
- ESXi hosts with unsupported mode enabled
- General Capacity information based on CPU/MEM usage of the VMs
- vSwitch free ports
- Disk over commit check
- Host configuration issues
- VCB Garbage (left snapshots)
- HA VM restarts and resets
- Inaccessible VMs
vCheck has been designed to add output from any script (.ps1 file) in the plugins folder, each one of these will be run in numerical or alphabetical order and the output included in the vCheck report. If you are not interested in the information for one of the checks it is highly recommended you remove the file as this will make the report faster.
All plugins can be found at the Plugins page of this site and will be updated frequently with new versions and new plugins from different authors.
For a great way to manage these make sure you check out Jake’s post here, he will show you how to use PowerCLI to easily check for new plugins and plugins which you do not have installed, you can even install them in a single command.
The Header.jpg in the root of the vCheck folder will be used and displayed in the title bar of the report (unless your email client does not support embedded base64 encoded images), this can be replaced with any image file of your choice but it is advised you stick to the same length and width as the current image.
A selection of headers can be found on the Headers page of this site.
The following will need to be installed for you to run this script and report on your VMware environment:
- PowerShell V2
- PowerCLU 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:
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:
.\vCheck.ps1 –OutputPath C:\vCheckOutput\DailyReports
Running 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 GlobalVariables.ps1 file on line 40 as below:
$VIConnection = Connect-VIServer $VIServer
$VIConnection = Connect-VIServer $VIServer –user “AlternateUsername” –Pass “Alternatepassword” –Protocol Https
An example report can be seen by clicking the below image or here, please note that not all checks are triggered here.
Download current version
Download vCheck 6.15
Downloaded 30758 times
Previous version Download
Download previous version (vCheck 5.0)
Downloaded 34462 times
# v 6.10 – Fixed multiple spelling mistakes and small plugin issues
# v 6.9 – Fixed VMKernel logs but had to remove date/Time parser due to inconsistent VMKernel Log entries
# v 6.8 – Added Creator of snapshots back in due to popular demand
# v 6.7 – Added Multiple plugins from contributors – Thanks!
# V 6.6 – Tech Support Mode Plugin fixed to work with 5.0 hosts
# V 6.5 – HW Version plugin fixed due to string output
# V 6.4 – Added a 00 plugin and VeryLastPlugin for vCenter connection info to separate the report entirely from VMware if needed.
# V 6.3 – Changed the format of each Plugin so you can include a count for each header and altered plugin layout for each plugin.
# V 6.2 – Added Time to Run section based on TimeToBuild by Frederic Martin
# V 6.1 – Bug fixes, filter for ps1 files only in the plugins folder so other files can be kept in the plugins folder.
# V 6.0 – Moved plugins into seperate scripts to make it easier to expand vCheck and fixed issues + lots lots more !
# V 5.1 – Code Fixes and ability to change colour for title text to fix issue with Outlook 2007/10 not displaying correctly
# V 5.0 – Changed the order and a few titles etc, tidy up !
# V 4.9 – Added Inacessable VMs
# V 4.8 – Added HA VM restarts and resets
# V 4.7 – VMTools Issues
# V 4.6 – Added VCB Garbage
# V 4.5 – Added Host config issues
# V 4.4 – Added Disk Overcommit check
# V 4.3 – Added vSwitch free ports check
# V 4.2 – Added General Capacity Information based on CPU and MEM ussage per cluster
# V 4.1 – Added the ability to change the colours of the report.
# V 4.0 – HTML Tidy up, comments added for each item and the ability to enable/disable comments.
Q. How do I add multiple Email recipients ?
A. Edit the Global Variables.ps1 file and replace the line starting $EmailTo to the following:
$EmailTo ="email@example.com", "firstname.lastname@example.org"