Often you need to record what a script does to a file. You can easily get something going with Start-Transcript but sometimes you want to control what is written with a bit more granularity.
So here’s a function I tend to re-use in my scripts. It takes text output and writes it both to a text log file and to the Verbose output stream. Continue reading “PowerShell: A Logging Function”