![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | out-file error I am consistently getting an error when I try to use out-file: PS M:\> get-process | out-file -filepath M:\process.txt Out-File : Unknown error "-1". At line:1 char:23 + get-process | out-file <<<< -filepath M:\process.txt I've tried different locations to save the file, even running the shell and command as a Domain Admin - same error. Tried uninstalling powershell, repairing the .Net framework and then reinstalling PS, reboots, etc. - same error. Running Windows XP SP2 on an IBM Thinkpad (T42) Has anyone else experienced this? |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | Re: out-file error Can you try: get-process > M:\process.txt ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #3 (permalink) | ||||||||||||
| Guest | RE: out-file error Let me add that I can do all of these functions from a regular command prompt. (Create, copy, append, etc) "DaveG" wrote:
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #4 (permalink) | ||||||||||||||||||||||||
| Guest | Re: out-file error "DaveG" <DaveG@xxxxxx> wrote in message news:C2053667-AA90-4563-AD87-9556F46EA62D@xxxxxx
What happens if you get prompted for the FilePath parameter? FWIW it doesn't like getting a question mark (?) at that time either? <eg> <PS_output Version="V2 (CTP)"> cmdlet out-file at command pipeline position 2 Supply values for the following parameters: FilePath: ? Out-File : Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index At line:1 char:23 + get-process | out-file <<<< -v -d </PS_output> I noticed that out-file is seen as a "cmdlet" so I tried adding "commonparameters" -verbose and -debug, evidently to no useful effect. Makes me wonder if that might be a source of your symptom but I don't know how to check for it... Have you tried capturing a trace of this with ProcMon? E.g. that might expose an underlying permissions problem on a registry or file access. (!) It could also show _me_ how out-file appears as a "cmdlet"... Or not... It's mostly .NET stuff and I don't know how to trace it. Good luck Robert Aldwinckle ---
| ||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||
| | #5 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: out-file error Good point Robert, this can shed some light on it. Dave, can you run this and check for hints in the output: trace-command -name OutFileCommand,ErrorDetails -expression { "test" | out-file deleteMe.txt} -pshost ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com
| ||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error Message "File System Error (65535) | Cindy | Vista General | 2 | 06-01-2008 06:43 PM |
| coping file from a remote file share - FILE IS NO LONG THERE bogus error message | Heith | Vista networking & sharing | 0 | 10-18-2007 03:58 PM |
| Error 1325 - 'File name' is not a valid short file name. | Bobby Fu | Vista installation & setup | 0 | 07-04-2007 12:35 AM |
| vista x64 RTM + Office 2007 = Error 1310.Error writing to file c:\ | planetf1 | Vista General | 2 | 03-24-2007 05:53 AM |
| "Registration Error! Error during saving sugnature file! | Larry | Vista General | 2 | 02-08-2007 03:11 PM |