tdubb123
Expert
Expert

find VM that was deleted from vcenter

Jump to solution

Trying to find a VM that was deleted from vcenter. Probablyt last 2 weeks

is this right?

Get-VIEvent -maxsamples ([int]::MaxValue) -Start (Get-Date).AddDays(–14) | where{$_ -is [VMware.Vim.VmRemovedEvent] }

?

0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership

Just in case you are going to copy&paste this, make sure that you replace the "–14" with "-14". Seems some kind of autocorrect issue with the minus sign.


André

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership

Yes, that should find the removed VMs over the last 14 days


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
a_p_
Leadership
Leadership

Just in case you are going to copy&paste this, make sure that you replace the "–14" with "-14". Seems some kind of autocorrect issue with the minus sign.


André

View solution in original post

0 Kudos
tdubb123
Expert
Expert

Thanks

0 Kudos