PowerShell Tail From Temp File Containing Date


  • Share on Pinterest

$currentDate = Get-Date -Format "yyyy-MM-ss";
# The file is in the parent temp directory, not the user specific temp directory
$TailFilePath = $env:TEMP + "\..\$currentDate process log usage.txt";
Get-Content -Path $TailFilePath -Wait -Tail 15;