View Single Post
Old 11-28-2007   #4 (permalink)
Marco Shaw [MVP]


 
 

Re: native command messages/errors

Quote:

> Is there a way to “pipe” the native command call to a text file and then
> read that back into powershell after the command finishes? I tried to do this
> but the DOS pipe “>” didn’t work for whatever reason.
>
> E.g.
> & "$TFExecutablePath\.\tf.exe workspace /delete $Name
> /s:$TeamFoundationServerUrl /noprompt > c:\test.txt"

Try moving "> c:\test.txt" outside of the quotes.

Marco


--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
My System SpecsSystem Spec