I need to find what VMs were on a host prior to putting into maintenance mode. I had an issue and want to know if it is related to a particular VM.
I figured using Get-VIevent to search the logs and show what was migrated off the host between 10:00 am and 11:00am on 1/1/1970.
I have this but am having trouble getting it to work.
Get-VM | Get-VIEvent –Start “3/10/2017 8:00 AM” –Finish “3/10/2017 9:00 AM” | Where {$_.Gettype().Name -eq "VmBeingMigratedEvent"}
Get-VM | Get-VIEvent –Start “3/10/2017 8:00 AM” –Finish “3/10/2017 9:00 AM” | Where {$_.Gettype().Name -eq "MigrationEvent"}
Get-VM | Get-VIEvent –Start “3/10/2017 8:00 AM” –Finish “3/10/2017 9:00 AM” | Where {$_.Gettype().Name -eq "MigrationEvent"}
I do not get errors it just returns to the prompt.
Any help will be appreciated.