Exposing a stream around a log file for synchronous writes using Powershell

I was recently looking at streaming output to a log file synchronously in a powershell session to write numerous events for invoking several cmdlets in a script operation. In order to achieve this I was able to leverage the FileStream and StreamWriter classes as well as creating a log function to both write the event … More Exposing a stream around a log file for synchronous writes using Powershell