VMware Cloud Community
tdubb123
Expert
Expert
Jump to solution

find VM that was deleted from vcenter

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
Jump to solution

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
Jump to solution

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
Jump to solution

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é

0 Kudos
tdubb123
Expert
Expert
Jump to solution

Thanks

0 Kudos