yoyoclouds

just another cloudy day….

VM Report- PowerCLI Script

on May 14, 2012

VM Report- PowerCLI Script

This is a pretty straight forward script written in PowerCLI..

This script will generate an Excel sheet with some VM information in it… For E.G. it will color the cell red if the Power State of a VM equals to NotRunning… or if the version of VMware Tools installed in it are old/ outdated..

YOU CAN DOWNLOAD THIS SCRIPT FROM HERE

NOTE: To run the script, simply copy the contents from the PDF and paste it in a new file with the extension as “.ps1

To run the script:

  1. You will require PowerCLI to be installed on your local machine
  2. Administrative rights to run the script as well as administrative rights to your vCenter Server

Steps to run the script:

  1. start your PowerCLI command line tool
  2. go the the directory where you have saved the script (In this case, i have saved it in D:/scripts folder)
  3. run the script
  4. when the script executes, it will ask you to enter your vCenter IP (In this case, its 172.31.72.19)
  5. provide the IP and hit enter key.

  1. it will prompt you to enter your vCenter credentials. Provide your Administrative credentials.

  1. once you provide your correct credentials, the script will start execution.
  2. it will display a Excel sheet with a Header row and some data in the beginning. Eventually it will be populated as the script gathers more info from your vCenter. a Demo Output image is shown below:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: