Email this to a friend
 
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

Send a link to this post to yourself or a friend.

Send to e-mail:
Your name:
Your e-mail:
Captcha:
Type the letters and numbers as shown.
/get/captcha/1711707616
Not readable? Get another.
 
Information entered is solely used for sending a one-time e-mail, and is not retained and/or passed on to a third party.
 
 
 
 
« March 2024»
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930
31      
 
Links
 
Quote
« Smith & Wesson - the original point and click interface »