Alan Renouf is definitely on of the most active bloggers when we are talking about Powershell/PowerCLI. His posts are always educational and of a high quality. I love the one-liners but nothing, absolutely nothing, beats this awesome Daily Report script that Alan has just published. I’m not going to repost his full article because I think all of you should visit Alan’s website and give him feedback on the script so he can improve it.
There is a configurable section at the start of the script where you can set how many days old you would like your snapshots to be allowed in your infrastructure, anything over this will show in the report, it will even resolve the name ( the machine running the script must be part of an Active Directory Domain) so that you can forward this email on to them and ask them if they still need the snapshot.
The outcome of the script also contains:
- Datastores that have less than x% free space
- VMs which have been created in the last x days and who created these
- VMs which have been deleted and who deleted them
- Any Virtual Center Events which have been logged during the given timeframe
- Any VM’s which have no VMtools installed
- The state of all VMware services on the vCenter server
- Any Windows events from the Virtual center server which are related to VMware
- Any VMs which have CD-Rom or Floppy Drive’s connected
- Any hosts in Maintenance Mode
- Any Hosts in a disconnected state
Schedule it and email it to your helpdesk on a daily base and let them check the outcome and archive it. It might come in handy sometime when you need to troubleshoot your environment, believe me it will… Thanks Alan, keep it up.