CodeConnect.Net Beta


   Explore    Entry   Register  Login  
windowsxp-general
access
windows-vista-mail
windows-vista-general
windowsupdate
windowsmedia-player
access-forms
windows-live-mail-desktop
windowsxp-help_and_support
access-queries
access-modulesdaovba
access-formscoding
windows-server-sbs
windows-server-general
access-reports
windows-vista-music_pictures_video
windowsce-platbuilder
windows-live-messenger
windows-terminal_services
windows-powershell
windows-server-active_directory
access-gettingstarted
windows-mediacenter
windowsxp-hardware
windowsxp-network_web
windows-64bit-general
windows-live-sync
windows-vista-hardware_devices
windows-inetexplorer-ie6_outlookexpress
windows-group_policy
windows-server-networking
windows-vista-installation_setup
windows-vista-networking_sharing
windowsxp-basics
access-tablesdbdesign
windowsxp-perform_maintain
windows-vista-performance_maintenance
windows-networking-wireless
windows-vista-file_management
windows-inetexplorer-ie6-browser
windows-server-dns
windows-server-update_services
windows-vista-security
windows-vista-administration_accounts_passwords
windows-vista-games
windows-file_system
windows-live-foldershare
windows-live-photogallery




Can Reply:  Yes Members Can Edit: No Online: Yes
Zone: > Microsoft News > microsoft.public.windows.powershell Tags:
Item Type: Date Entered: 12/13/2009 10:24:34 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 0 Views: 196 Favorited: 0 Favorite
1 Items, 1 Pages 1 |< << Go >> >|
Gerry Hickman <
NewsGroup User
Redirection 1>StdOut.txt 2>StdErr.txt12/13/2009 10:24:34 AM
Reply

0

Hi,

I have some tasks that take hours to run. Using WSH I'm able to run the
task in silent mode (scheduled task) sending the output to StdOut.txt
and status messages to StdErr.txt, I can open either of these files for
Reading, even while the task is still running (e.g. from a web server).

d:\scripts\myscript.wsf 1>StdOut.txt 2>StdErr.txt

With PowerShell, I've run into two problems with this. I've been able to
separate the output from the status messages by sending the output to
the pipeline, and using write-host for the status messages, I can then
redirect the pipline output to StdOut.txt

..\PsTest.ps1 > StdOut.txt

but the status messages always go to the screen (which no one can see!).
So my question is how can I redirect the status messages AND the output
to two different files?

The second issue is that under PowerShell, I am not able to open the log
files for reading while the PowerShell process is still running "File
locked by another process".

--
Gerry Hickman (London UK)
1 Items, 1 Pages 1 |< << Go >> >|







Similar:

file manipulation script

how to deploy powershell?

getting the number of keys in a hashtable?

passing values... should be easy...

i thought powershell was mta

powershell: script to retrieve path of file given the filename on a remote unix server

properties of the get-eventlog cmdlet?

creating my own commandlets with c#

is it possible to run a powershell script as a windows service?

using powershell on a shared system

mount exchange 2003 databases using powershell

redirection 1>stdout.txt 2>stderr.txt

exchange - disable-mailuser

limit the recurse of gci

powershell and sysinternals utility psexec

can powershell perform event listener ?

writing bytes rather than unicode

suppressing file name and line number when using select-string

slow?

how stop powershell flashing when run with .net process object?

is there a simple, free, method to send files using ftp?

what happened to powershellguy.com

writeobject and objects owned by thread

is this a know issue?

disabling "automatically adjust clock for daylight saving changes" option

get-process, and add computer name

baffled by v2 advanced functions

help file interpretation

why are these different results

getting access to ad object properties

documentation via robodoc

null variable inside if statement

powershell for the home user

ini file compare option

codedom provider for powershell

how to get data from performance counters only for one particular process

concatenate cmdlet

invalid performance counter path

how to retrieve the script name inside powershell?

adding a group from another domain / forest

format-table is not my friend

technet.microsoft.com powershell webpages are now updated to powershell version 2

set-item and the magic -concatenate argument...

standard cmdlet verbs - 'manage'?

reoplace text in multiple word docs

using powershell to manage file associations

newbie question: basic select-object question.

powershell.exe troubles with spaces, quotes, and arguments

the windows registry

powershell in safe mode?

   
  Privacy | Contact Us
All Times Are GMT