vCheck (Daily Report) V3

Version 3

     

    Daily Report does what it says on the tin, it runs as a scheduled task before you get into the office to present you with key information about your infrastructure in a nice easily readable format.

     

    For more information see my blog post.

     

    This script picks on the key areas of the virtual infrastructure 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 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.

     

     

     

     

     

     

    Initially when I started this script I wanted people to be clear

    that this was a report that was going to give you a daily summary of

    any issues which may exist in your Virtual Infrastructure, from the

    beta testing I did to a select few it was clear that they were

    expecting this to send them a full inventory of their infrastructure.

     

     

    That wasn’t the point in this script and I think people now have the

    idea that this is more of an issue log than an audit script so I will

    now revert to my original name of…. vCheck.

     

     

    The key thing to remember is that if an issue does not exist in a

    particular area then it will not show in the output, when and if issues

    turn up they will start appearing in the output almost like magic !

     

     

    I want to thank everyone who is using this script and those who have

    left a comment, even if its just to say how much you like it !

     

     

    I especially want to thank Raphaël SCHITZ (http://www.hypervisor.fr/) for all his contributions, he has added some great features to this version and helped me take it to a new level.

     

     

     

     

     

    So what areas does this script report on ?

     

     

     

    The previous version already reported on these areas:

     

    • 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 stored on local datastores

    • 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

     

    So what is added to V3 ?

     

     

    Well firstly I have fixed some bugs which existed in V2 and made things slightly faster.

     

     

    The other added features are as below:

     

    • Status report to screen whilst running interactively

    • At the top of the script you can now turn off any areas you do not want to report on (this makes it faster to run)

    • VMs on Local storage has been changed to report 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)

    • Added the number of issues to each title line

     

    As always please let me know if you have any comments, I already

    have some great ideas that I could not fit into this version so watch

    out for V4 !

     

     

    +Also a reminder that this script also checks your Windows

    vCenter server for services and event logs, it does this via WMI and

    therefore needs the correct permissions, there is still an area at the

    top of the script which you can give alternate credentials from the

    account that is running the script if needed.+

     

     

    If your new to this script and would like more details on how it looks or how to run it please check this post.

     

     

    At the bottom of he script is also an area which you can uncomment to save a the daily report as a htm file in a specific folder.

     

    I think that’s it !

     

    If there is anything missing please let me know and I will add it to future versions.

     

    To run this script simple setup a scheduled task as per my previous post running the script and passing it your VI server as a parameter as below:

     

    C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile “C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1″ ” &  “C:\Scripts\DailyReport.ps1 TESTVC01″