I have the below code and currently it loads all the information on screen. I want it to log to a log file on D:\\Apps\\Logs.
The log file needs to have the name of
Gist with log rotation: https://gist.github.com/barsv/85c93b599a763206f47aec150fb41ca0
Usage:
. .\logger.ps1 Write-Log "debug message" Write-Log "info message" "INFO"