How To Guy

vSphere Environment Reports on the Cheap

PowerCLI and vCheck combine for a powerful, inexpensive solution.

In an enterprise vSphere environment, there are times where you need a lot of critical information about various vCenter servers, ESXi hosts and other components. I currently have a customer with an extensive vSphere environment who needs reporting done frequently, in detail, automated and sometimes on demand.

There are many third-party applications that will do the job, but some are very costly and have built-in limitations. I prefer solutions that have proven reliability, a solid reputation and are either free or low cost.

A current customer requested that my team provide detailed and on-demand reporting of their vSphere environment, at a thrifty price. Our choice was to utilize VMware PowerCLI. PowerCLI is one of the best VMware reporting solutions available, once you learn the basics and how to properly use it.

PowerCLI interfaces with Microsoft Windows PowerShell; it's a vendor-specific addition to the core Windows PowerShell environment. In this instance, I used a PowerCLI script called vCheck. This script searches the vSphere environment and can generate configuration, status, summary and other detailed information on your vCenter, host, virtual machines, datastores, virtual networks and clusters. vCheck isn't well known in the VMware community, but it's extremely user-friendly.

Here are the steps to get vCheck up and running in your vSphere environment:

  1. Download and install the latest versions of PowerCLI and Windows PowerShell. (If you're downloading the most current version of Windows PowerShell 4.0, please make a note that it's now part of the Windows Management Framework 4.0.)
  2. Download the latest version of vCheck.
  3. Ensure you have vCenter Server 2.5 or later.
  4. Ensure you have a Microsoft Active Directory Administrator account.

Once you have the vCheck perquisites completed, launch your downloaded *.\vCheck.ps1 script from the PowerCLI command window. After the initial completion and configuration of the *.\vCheck.ps1 script, subsequent uses of the script won't require any additional input. Create a batch file to be run as a scheduled task:

C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe  
  -PSConsoleFile "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1"
  -command "&{C:\scripts\myscript.ps1}" 
Save the batch file to run vCheck as a scheduled task (that is, vCheck.cmd).

You now have the necessary foundation established. Final configuration of vCheck is a somewhat lengthy, but straightforward, process: this vCheck Detailed Setup video will walk you through the remaining configuration and completion process.

Once your vCheck vSphere reporting project is complete, you'll have the vCheck script generating your automated, detailed and on-demand vSphere environment reports. The reports are customizable, allowing them to scale as your vSphere environment grows. You'll also save a lot of money over an expensive, but limited, vSphere reporting system.

About the Author

James Brown, vExpert, VCP, MCSE, is a senior virtualization engineer and CEO of Virtuxperts and VMware Users Group Leader in Las Vegas, NV. James' area of expertise includes virtualization, infrastructure and Windows systems.

Featured

Subscribe on YouTube