My last post got me thinking… I myself have a rule-of-thumb that all snapshots will be removed in my environment if they are older than 6 weeks.
I used to do this manually with the SCVMM console… but I dislike manual labor
So, I did some playing around in my latest favorite tool: PrimalScript ![]()
This is what I came up with:
Get-VMCheckpoint | ForEach-Object {if ($_.AddedTime -lt (Get-Date).AddDays(-42)) {Remove-VMCheckpoint -VMCheckpoint $_}}
As you can see, I am using the AddDays method. Why I did not use the AddWeeks method?
Simple answer: It doesn’t exsist (yet) ![]()
http://technet.microsoft.com/en-us/library/ee176845.aspx

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 