In PowerShell, I was able to run the following line: Get-ChildItem -Path $logPath |? {!$.PSIsContainer -and $.Extension -eq ".log"} | Foreach{$_.Refresh()}
Before the line I wanted to use the LastWriteTime in:
Get-ChildItem -Path $logPath | ? {!$.PSIsContainer -and $.Extension -eq ".log" -and $_.LastWriteTime -gt (Get-Date).AddSeconds(-35)}
| Sort-Object -Property Name -Descending | Select-Object -First 1