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:
- You will require PowerCLI to be installed on your local machine
- Administrative rights to run the script as well as administrative rights to your vCenter Server
Steps to run the script:
- start your PowerCLI command line tool
- go the the directory where you have saved the script (In this case, i have saved it in D:/scripts folder)
- run the script
- when the script executes, it will ask you to enter your vCenter IP (In this case, its 172.31.72.19)
- provide the IP and hit enter key.
- it will prompt you to enter your vCenter credentials. Provide your Administrative credentials.
- once you provide your correct credentials, the script will start execution.
- 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: