![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Out-File: Unknown error "-1". Whenever I try to create or copy a file I get the error as below on my XP SP2 machine. I've reinstalled PowerShell but that didn't help, and none of the other forums questions that I've found through google seem to have an answer why this happens. Error message: PS C:\> Get-Process | Out-File -FilePath c:\test.txt Out-File : Unknown error "-1". At line:1 char:23 + Get-Process | Out-File <<<< -FilePath c:\test.txt Does anyone have any ideas what to do? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Out-File: Unknown error "-1". What OS? Can you out-file to any other location? ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com Quote: > Whenever I try to create or copy a file I get the error as below on my > XP SP2 machine. I've reinstalled PowerShell but that didn't help, and > none of the other forums questions that I've found through google seem > to have an answer why this happens. > > Error message: > PS C:\> Get-Process | Out-File -FilePath c:\test.txt > Out-File : Unknown error "-1". > At line:1 char:23 > + Get-Process | Out-File <<<< -FilePath c:\test.txt > Does anyone have any ideas what to do? > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Out-File: Unknown error "-1". I'm using XP with SP2, and I'm the administrator. I can't out-file to any other location that I've tried, for example my documents folder. And I can't copy-item to them either. "Shay Levi" wrote: Quote: > > What OS? Can you out-file to any other location? > > ----- > Shay Levi > $cript Fanatic > http://scriptolog.blogspot.com > Quote: > > Whenever I try to create or copy a file I get the error as below on my > > XP SP2 machine. I've reinstalled PowerShell but that didn't help, and > > none of the other forums questions that I've found through google seem > > to have an answer why this happens. > > > > Error message: > > PS C:\> Get-Process | Out-File -FilePath c:\test.txt > > Out-File : Unknown error "-1". > > At line:1 char:23 > > + Get-Process | Out-File <<<< -FilePath c:\test.txt > > Does anyone have any ideas what to do? > > > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Out-File: Unknown error "-1". I remember an old post on the same issue, I wasn't able to find a solution ![]() If you want to take a look at it, search this NG for a post with a subject line of "out-file error", by DaveG, 01/31/2008. maybe someone else can contribute here. ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com Quote: > I'm using XP with SP2, and I'm the administrator. I can't out-file to > any other location that I've tried, for example my documents folder. > And I can't copy-item to them either. > > "Shay Levi" wrote: > Quote: >> What OS? Can you out-file to any other location? >> >> ----- >> Shay Levi >> $cript Fanatic >> http://scriptolog.blogspot.com Quote: >>> Whenever I try to create or copy a file I get the error as below on >>> my XP SP2 machine. I've reinstalled PowerShell but that didn't help, >>> and none of the other forums questions that I've found through >>> google seem to have an answer why this happens. >>> >>> Error message: >>> PS C:\> Get-Process | Out-File -FilePath c:\test.txt >>> Out-File : Unknown error "-1". >>> At line:1 char:23 >>> + Get-Process | Out-File <<<< -FilePath c:\test.txt >>> Does anyone have any ideas what to do? |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Out-File: Unknown error "-1". Evjan wrote: Quote: > Whenever I try to create or copy a file I get the error as below on my XP SP2 > machine. I've reinstalled PowerShell but that didn't help, and none of the > other forums questions that I've found through google seem to have an answer > why this happens. > > Error message: > PS C:\> Get-Process | Out-File -FilePath c:\test.txt > Out-File : Unknown error "-1". > At line:1 char:23 > + Get-Process | Out-File <<<< -FilePath c:\test.txt > > Does anyone have any ideas what to do? The error isn't shown here, but it does mention that PowerShell can have problems accessing the root of a drive on some systems: http://support.microsoft.com/default.aspx/kb/941660 Marco -- Microsoft MVP - Windows PowerShell http://www.microsoft.com/mvp PowerGadgets MVP http://www.powergadgets.com/mvp Blog: http://marcoshaw.blogspot.com |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Out-File: Unknown error "-1". Have you tried using the -Force parameter on out-file ?? -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk "Marco Shaw [MVP]" wrote: Quote: > Evjan wrote: Quote: > > Whenever I try to create or copy a file I get the error as below on my XP SP2 > > machine. I've reinstalled PowerShell but that didn't help, and none of the > > other forums questions that I've found through google seem to have an answer > > why this happens. > > > > Error message: > > PS C:\> Get-Process | Out-File -FilePath c:\test.txt > > Out-File : Unknown error "-1". > > At line:1 char:23 > > + Get-Process | Out-File <<<< -FilePath c:\test.txt > > > > Does anyone have any ideas what to do? > Can you try writing to a subdirectory? > > The error isn't shown here, but it does mention that PowerShell can have > problems accessing the root of a drive on some systems: > http://support.microsoft.com/default.aspx/kb/941660 > > Marco > > -- > Microsoft MVP - Windows PowerShell > http://www.microsoft.com/mvp > > PowerGadgets MVP > http://www.powergadgets.com/mvp > > Blog: > http://marcoshaw.blogspot.com > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Out-File: Unknown error "-1". Marco: Yes, I've tried plenty of folders, including my home folder. Still the same error. Richard: I tried the -Force parameter, and that didn't help either I'm afraid. Thanks for the tips both of you though. Any other ones? "RichS" wrote: Quote: > Have you tried using the -Force parameter on out-file ?? > -- > Richard Siddaway > Please note that all scripts are supplied "as is" and with no warranty > Blog: http://richardsiddaway.spaces.live.com/ > PowerShell User Group: http://www.get-psuguk.org.uk > > > "Marco Shaw [MVP]" wrote: > Quote: > > Evjan wrote: Quote: > > > Whenever I try to create or copy a file I get the error as below on my XP SP2 > > > machine. I've reinstalled PowerShell but that didn't help, and none of the > > > other forums questions that I've found through google seem to have an answer > > > why this happens. > > > > > > Error message: > > > PS C:\> Get-Process | Out-File -FilePath c:\test.txt > > > Out-File : Unknown error "-1". > > > At line:1 char:23 > > > + Get-Process | Out-File <<<< -FilePath c:\test.txt > > > > > > Does anyone have any ideas what to do? > > Can you try writing to a subdirectory? > > > > The error isn't shown here, but it does mention that PowerShell can have > > problems accessing the root of a drive on some systems: > > http://support.microsoft.com/default.aspx/kb/941660 > > > > Marco > > > > -- > > Microsoft MVP - Windows PowerShell > > http://www.microsoft.com/mvp > > > > PowerGadgets MVP > > http://www.powergadgets.com/mvp > > > > Blog: > > http://marcoshaw.blogspot.com > > |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Out-File: Unknown error "-1". Evjan wrote: Quote: > Marco: Yes, I've tried plenty of folders, including my home folder. Still the > same error. > > Richard: I tried the -Force parameter, and that didn't help either I'm afraid. > > Thanks for the tips both of you though. Any other ones? Not really hading towards a fix just yet, but I don't know how long we can troubleshoot this particular system. It is not a common problem any of us have seen. Marco |
My System Specs![]() |
| | #9 (permalink) |
| | Re: Out-File: Unknown error "-1". Hello Marco, Thanks for the tip. I got the same error using set-content and add-content on a ordinary .txt-file. I guess I have to continue using cygwin instead ![]() // Peter "Marco Shaw [MVP]" wrote: Quote: > Evjan wrote: Quote: > > Marco: Yes, I've tried plenty of folders, including my home folder. Still the > > same error. > > > > Richard: I tried the -Force parameter, and that didn't help either I'm afraid. > > > > Thanks for the tips both of you though. Any other ones? > Do set-content or add-content work? > > Not really hading towards a fix just yet, but I don't know how long we > can troubleshoot this particular system. It is not a common problem any > of us have seen. > > Marco > |
My System Specs![]() |
| | #10 (permalink) |
| | Re: Out-File: Unknown error "-1". Evjan wrote: Quote: > Hello Marco, > > Thanks for the tip. I got the same error using set-content and add-content > on a ordinary .txt-file. I guess I have to continue using cygwin instead ![]() My email on this message is valid. Just remove the "_NO_SPAM_" in it. Marco |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| "Extensible Authentication Protocol" service gives "The system cannot find the file specified" error | Vista networking & sharing | |||
| Can't delete inbox mail "an unknown error has occurged." | Vista mail | |||
| change standardprogram to open a file to "unknown" | Vista account administration | |||
| attempting to copy to the disk itunes (-53) "unknown error" | Vista General | |||
| "unknown error" - "error desconocido" | Vista mail | |||