VMware Cloud Community
mfugazzi
Contributor
Contributor

Enhancements to Get-Log?

Hello. I'm trying to grab the last three hours of the vCenter log, and I wonder if any enhancements to Get-Log are forthcoming as promised. 

Get-Log -Key vpxd:vpxd.log | Select-Object -ExpandProperty Entries | Where {$_ -notmatch "verbose"}

 

I can't bound the time span. Adding | Where {$_ -match "2022-09-16"} allows matching to the day, but that's not granular enough. 
-startLineNum and -NumLines aren't helpful at all. Any chance to add parameters such as -Start <DateTime> as Get-Stat has? 
 
Thanks!
Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

If you have the credentials to SSH to the VCSA, you can use a script, via Invoke-VMScript, to extract a more precise time range.

If you are asking for a new PowerCLI feature, use the PowerCLI Ideas website.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference