I was wondering if someone could point me in a direction...
My code snippet is like this
Get-VIevent –Maxsamples 100 -Server $physicalserver1 | Select-Object CreatedTime, host, fullformattedmessage
Which returns something like this...
CreatedTime Host FullFormattedMessage
----------- ---- --------------------
11/30/2020 3:25:06 PM VMware.Vim.HostEventArgument Lost access....
How do I show the hostname in the output instead of VMware.Vim.HostEventArgument?
Thanks for your help!
You can use a calculated property.
Get-VIevent –Maxsamples 100 -Server $physicalserver1 |
Select-Object CreatedTime, @{N='VMHost';E={$_.Host.Name}}, fullformattedmessage
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You can use a calculated property.
Get-VIevent –Maxsamples 100 -Server $physicalserver1 |
Select-Object CreatedTime, @{N='VMHost';E={$_.Host.Name}}, fullformattedmessage
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That worked perfect! Thanks!!