I’m working on a VSphere CLI script that will take 6 snapshots and allow me to make the description of each snapshot be the date it was created. At the moment here’s the code that I’m trying:
$server = "<ServerName>"
connect-VIserver $server
$snapshot = Get-vm | New-Snapshot -Name $"<serverName>" | Set-Snapshot -$snapshot -Description get-date
You can do this in one call
I’m not sure why you want to do this as, the snapshot object has a property called "Created"
You can get it by doing something like this: