The Storage vMotion events can be tracked using the below script. You can use this script to the get the count of Storage vMotion events in the past 24 hrs.

Get-VIEvent -MaxSamples ([int]::MaxValue) -Start (Get-Date).AddDays(-1) |
Where { $_.GetType().Name -eq “TaskEvent” -and $_.Info.DescriptionId -eq “VirtualMachine.relocate” -or $_.Info.DescriptionId -eq “StorageResourceManager.applyRecommendation”} |
Measure-Object | Select-Object -ExpandProperty Count 

Posted in: Vmware.
Last Modified: January 12, 2017

Leave a reply