Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - write whatif output to file

Reply
 
Old 10-08-2006   #1 (permalink)
gaindev


 
 

write whatif output to file

Redirecting text output to a file works fine by using either > operator or |
out-file, but it does not seem to work if the text output is from commands
with -whatif switch.

eg: the following command will print the output on the screen instead of
writing to the file
move-item c:\temp\* d:\temp -whatif > c:\test.txt

Is there anyway around this or it's just imposible to redirect whatif output
to a file?
Any help would be appriciated!!!

gaindev
ps:i'm using PS rc2

My System SpecsSystem Spec
Old 10-09-2006   #2 (permalink)
gaindev


 
 

RE: write whatif output to file

sorry for double-post. That was because the system kept saying

An error occurred while sending your post
--------------------------------------------------------------------------------

We're sorry, but there was a problem with the system and your post was not
received. The error has been reported to Operations and will be investigated
as soon as possible. Please try again later.

Can someone delete these 2 posts for me please?

"gaindev" wrote:

> Redirecting text output to a file works fine by using either > operator or |
> out-file, but it does not seem to work if the text output is from commands
> with -whatif switch.
>
> eg: the following command will print the output on the screen instead of
> writing to the file
> move-item c:\temp\* d:\temp -whatif > c:\test.txt
>
> Is there anyway around this or it's just imposible to redirect whatif output
> to a file?
> Any help would be appriciated!!!
>
> gaindev
> ps:i'm using PS rc2

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Formatting output with write-host PowerShell
No output from write-output PowerShell
write-output array without C/R PowerShell
Duplicating import-csv with write-output PowerShell
how to redirect whatif output to a file? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46