Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 251495

Get-VIEvent Entity parameter not working

$
0
0
Foreach ($esx in $esxhosts) {
     Get-VIEvent -Entity (Get-VMHost $esx).Entity -Start (Get-Date).AddHours(-1) -Finish (Get-Date) `
          | Where {$_.GetType().Name -eq "EventEx"} `
          | Select @{N="Time";E={$_.CreatedTime.ToUniversalTime()}}, @{N="Message";E={$_.FullFormattedMessage}} `
          | Export-Csv c:\$esx.csv -UseCulture -NoTypeInformation
}

 

I have 3 hosts in $esxhosts but the result are all the same. Is this a known bug? or something is wrong with my command? or it is the expected behavior?

 

My PowerCLI version is latest but my Esx Hosts are version 4.1

 

Anyone encountered this?


Viewing all articles
Browse latest Browse all 251495

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>