Link to home
Start Free TrialLog in
Avatar of davidst98
davidst98

asked on

Powershell 2.0 Write output to display and append to file

Hi,

I would like to display a message in PowerShell and append the message to a log file.   In PowerShell 4.0 you can use Tee-Object -Append but I don't think they have the -Append option in PowerShell 2.0.    Is there an simple way to write a message to the screen and log file at the same time?   Thank you.

David

PS UnfortunatelyI can't upgrade to PowerShell 4.0.
ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of davidst98
davidst98

ASKER

Thanks!   That works perfect.