Skip to content

Instantly share code, notes, and snippets.

$Days = $%id%Days%id%
$Days = (get-date).adddays(-($Days))
$SnapshotList = $null
$SnapshotList = Get-VM | Get-VMSnapshot | where-object { $_.CreationTime -lt $Days }
if ($SnapshotList -eq $null)
{