From: freddy on
I would like to defrag a remote hard drive but I am having problems with the
output. Hee is my script

PsExec -i -s \\stmts01227 c:\winnt\system32\defrag.exe c: -v 2> C:\output.log
Just the output part is giving me problems
From: John John - MVP on
freddy wrote:
> I would like to defrag a remote hard drive but I am having problems with the
> output. Hee is my script
>
> PsExec -i -s \\stmts01227 c:\winnt\system32\defrag.exe c: -v 2> C:\output.log
> Just the output part is giving me problems

What is the "2" (-v 2>) supposed to do?

Try:

PsExec -i -s \\stmts01227 c:\winnt\system32\defrag.exe c: -v >
C:\output.log

John
From: Matthias Tacke on
Am 2010-04-29 18:32, schrieb John John - MVP:
> What is the "2" (-v 2>) supposed to do?
>
2> refers to error output

> PsExec -i -s \\stmts01227 c:\winnt\system32\defrag.exe c: -v >
> C:\output.log
>
if he want both streams to be included in the log he could use
>C:\output.log 2>&1

--
Regards
Matthias