Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 175326

Get-VIEvent "vSphere HA restarted virtual machine"

$
0
0

Hi floks

 

Can anyone help me to complete this script

 

Get-Cluster "test" |Get-VM | Get-VIEvent |Where-Object {$_.FullFormattedMessage -LIKE 'vSphere HA restarted virtual machine *'} |select ObjectName,@{N="IP addr";E={($_.Guest.IpAddress)}},CreatedTime,FullFormattedMessage

 

Out put :

 

ObjectName                          IP addr                             CreatedTime                        FullFormattedMessage             

----------                          -------                             -----------                        --------------------             

VM1                                                         05-Sep-14 4:14:29 PM               vSphere HA restarted virtual ma...

VM2                                                           05-Sep-14 4:14:25 PM               vSphere HA restarted virtual ma...

VM3                                                       05-Sep-14 4:14:25 PM               vSphere HA restarted virtual ma...

 

Unable to get ipaddress on this script.

pls provide if any good script to get vSphere HA restarted event  when host failure.


Viewing all articles
Browse latest Browse all 175326


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