powershell script to monitor checkpoints on hyper-v

Andy Doe
Andy Doe used Ask the Experts™
on
Hi i need to create a powershell script to check multiple hyper-v hosts for checkpoints over 24 hours old. could someone provide some assistance please.

so far i have Get-VMSnapshot but im not familiar enough with powershell to any more than this.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hi Andy

There you go:

Get-VM | Get-VMSnapshot | Where {$_.CreationTime -lt (Get-Date).AddDays(-1)} | Select-Object Name, CreationTime

Check all vms, which have snapshots, which the creationtime is older than 1 day (-1), show name and creationtime


cheers
Thomas

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial