Quantcast
Channel: VMware Communities : Discussion List - Automation Tools
Viewing all articles
Browse latest Browse all 9071

Selecting specific value of a property

$
0
0

Get-VIEvent-Start (Get-Date).AddHours(-14) -MaxSamples ([int]::MaxValue) |

where {$_.GetType().Name -eq"TaskEvent"}

 

Lists all TaskEvents from the last 14 hours - good

However, I want to select date/time, message and VM name

 

date/time and message no problem just:

selectCreatedTime,FullFormattedMessage

 

No idea how to get VM name so I can export this lot into a CSV.  VM name is a value (what is this called? Property attribute?) within the VM property of the Get-VIEvent object.  I just don't know how to extrapolate this particular single piece of a property into my output.  If I wanted just the name with no other info then:

select-ExpandPropertyVm

would work fine but I want the name alongside date/time and message.

 

Help please!


Viewing all articles
Browse latest Browse all 9071

Latest Images

Trending Articles



Latest Images

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