Advertisement
guyrleech

Get recent VMware vSphere events

Apr 20th, 2022
1,464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## first call Connect-VIServer to connect to the vCenter server(s) you want to interrogate
  2.  
  3. Get-VIEvent -Start ([datetime]::Now.AddHours( -1 )) | Where { -Not $_.Template -and -Not $_.Alarm -and $_.VM } | select -exclude vm,host,template,datacenter,computeresource, -property *,@{n='VM';e={$_.vm.Name}},@{n='Host';e={$_.Host.Name}},@{n='Datacenter';e={$_.datacenter.Name}}|sort createdtime -desc|ogv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement