Recently I needed to log the output of the Invoke-SQLCommand cmdlet including print statements. I did some digging and some people said that Verbose output cannot be logged in PowerShell v2. This is true, however – you CAN use Start-Transcript / Stop-Transcript and it will log everything that is in the PowerShell session…
Start-Transcript -path “deploy_db_transcript_$currentTimePrefix.txt”
.. power shell stuff ..