Hello,
I use to remove old snapshots with this script where I pute VM name and then run:
$vmlist = Get-Content C:\Users\gemela\Desktop\sv.txt
foreach($VM in $VMlist) {
Get-Snapshot -VM $vm |
Remove-Snapshot -Confirm:$false }
Disconnect-VIServer -Confirm:$false
I would like to set this script in a different way, to delete only snapshots older than X days except VM inside a txt list or except snapshots where name/description contain some specific word.
Thanks