Comments
 
posted on September 11th 2015, at 10:32
by lunarg

You can redirect the output of a Powershell script to a file. This is called transcribing, and is very useful if you have some Powershell scripts as scheduled tasks and wish to log its output.

$ErrorActionPreference="SilentlyContinue"
Stop-Transcript | out-null
$ErrorActionPreference = "Continue"
Start-Transcript -Path "C:\transcript.log" -Append
#
# My script code goes here...
#
Stop-Transcript
Add a new comment
 
Your name:
Your e-mail:
Your comment:
 
Basic BBcode is supported.
Captcha:
Type the letters and numbers as shown.
/get/captcha/1714808405
Not readable? Get another.