Virtual Machine expiration date PowerCLI script

04/06/2012 Lior Kamrat 0

From time to time a new VM request pops out but what if this specific VM is only temporary? Well, it would be great if you could put an expiration date on this VM just like a carton of milk, don’t you think? In order to get a daily report for all your expired VM you need to do the following: Create an additional VM annotation value called “Expiration Date”. You will also have to fill up the actual expiration date for this VM in a “MM/dd/yyyy” Get-Date PowerShell command format, for example: 06/04/2012 The Script: [sourcecode language=”powershell”] $Server = [Read More]