Rolling logs with PowerShell

I saw a video once on YouTube where the presenter had a PowerShell window open with rolling logs from a log file. I don’t remember which vide was that, or who was the presenter, but I have saved and tweaked their code.


We can just simply start the debugger console using dbps thanks to the alias.

And write logs into the log file like this "Hello PowerShell" >> $DebugLog and it will show up in the debugger window.