![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| | when run powershell script as windows service ,powershell fail On windows 2008 ,run powershell script by windows serivice application ,but this script always failed due to the following .Net runtime error ..NET Runtime version 2.0.50727.1433 - The Win32 internal error "Access is denied" 0x5 occurred when retrieving handle for active console output buffer. Please contact Microsoft Support Services. Another thing I need to get the result of powershell script by redirect stdout/stderr of powershell ,so I create powershell process without specified creation flags. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: when run powershell script as windows service ,powershell fail powershell fail on winodws 2008 wrote: Quote: > On windows 2008 ,run powershell script by windows serivice application ,but > this script always failed due to the following .Net runtime error > > .NET Runtime version 2.0.50727.1433 - The Win32 internal error "Access is > denied" 0x5 occurred when retrieving handle for active console output buffer. > Please contact Microsoft Support Services. > > Another thing I need to get the result of powershell script by redirect > stdout/stderr of > powershell ,so I create powershell process without specified creation flags. > Can you detail exactly what you're trying to do? 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![]() |
| | #3 (permalink) |
| | RE: when run powershell script as windows service ,powershell fail "powershell fail on winodws 2008" wrote: Quote: > On windows 2008 ,run powershell script by windows serivice application ,but > this script always failed due to the following .Net runtime error > > .NET Runtime version 2.0.50727.1433 - The Win32 internal error "Access is > denied" 0x5 occurred when retrieving handle for active console output buffer. > Please contact Microsoft Support Services. > > Another thing I need to get the result of powershell script by redirect > stdout/stderr of > powershell ,so I create powershell process without specified creation flags. > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: when run powershell script as windows service ,powershell fai I have windows services application ,which run script periodically . if this srcipt is common batch ,no problem .but if this script is wrotten in powershell and with externsion name ".ps1" , the script cann't be done and from applicataion event log ,I found some .Net runtime error I wan to know from .Net runtime error , can you tell me which win32API failed ,or can you tell me what powershell is try to doing at that point "Marco Shaw [MVP]" wrote: Quote: > powershell fail on winodws 2008 wrote: Quote: > > On windows 2008 ,run powershell script by windows serivice application ,but > > this script always failed due to the following .Net runtime error > > > > .NET Runtime version 2.0.50727.1433 - The Win32 internal error "Access is > > denied" 0x5 occurred when retrieving handle for active console output buffer. > > Please contact Microsoft Support Services. > > > > Another thing I need to get the result of powershell script by redirect > > stdout/stderr of > > powershell ,so I create powershell process without specified creation flags. > > > You're trying to run a PowerShell script as a service? > > Can you detail exactly what you're trying to do? > > 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![]() |
| | #5 (permalink) |
| | Re: when run powershell script as windows service ,powershell fai What's the command line you're service is running to invoke the script? ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com Quote: > I have windows services application ,which run script periodically . > if this > srcipt is > common batch ,no problem .but if this script is wrotten in powershell > and > with > externsion name ".ps1" , the script cann't be done and from > applicataion event log ,I found some .Net runtime error > > I wan to know from .Net runtime error , can you tell me which > win32API failed ,or can you tell me what powershell is try to doing at > that point > > "Marco Shaw [MVP]" wrote: > Quote: >> powershell fail on winodws 2008 wrote: >> Quote: >>> On windows 2008 ,run powershell script by windows serivice >>> application ,but this script always failed due to the following .Net >>> runtime error >>> >>> .NET Runtime version 2.0.50727.1433 - The Win32 internal error >>> "Access is denied" 0x5 occurred when retrieving handle for active >>> console output buffer. Please contact Microsoft Support Services. >>> >>> Another thing I need to get the result of powershell script by >>> redirect stdout/stderr of powershell ,so I create powershell process >>> without specified creation flags. >>> >> >> Can you detail exactly what you're trying to do? >> >> 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: when run powershell script as windows service ,powershell fai powershell fail on winodws 2008 wrote: Quote: > I have windows services application ,which run script periodically . if this > srcipt is > common batch ,no problem .but if this script is wrotten in powershell and > with > externsion name ".ps1" , the script cann't be done and from applicataion > event > log ,I found some .Net runtime error for example. Just for fun, wrap the PowerShell commands in a VBScript script following this example: http://blog.sapien.com/current/2006/...owershell.html |
My System Specs![]() |
| | #7 (permalink) |
| | Re: when run powershell script as windows service ,powershell fail Powershell.exe interacts with the console intimately, maybe .bat's don't neccisarily have to. However i'm sure you could make a small application yourself that hosts the powershell engine and runs scripts in the service. -Karl Marco Shaw [MVP] wrote: Quote: > powershell fail on winodws 2008 wrote: Quote: >> On windows 2008 ,run powershell script by windows serivice application >> ,but this script always failed due to the following .Net runtime error >> .NET Runtime version 2.0.50727.1433 - The Win32 internal error "Access >> is denied" 0x5 occurred when retrieving handle for active console >> output buffer. Please contact Microsoft Support Services. >> >> Another thing I need to get the result of powershell script by >> redirect stdout/stderr of powershell ,so I create powershell process >> without specified creation flags. >> > You're trying to run a PowerShell script as a service? > > Can you detail exactly what you're trying to do? > > Marco > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| help converting msdn windows update vbs script to powershell | PowerShell | |||
| Powershell V/s VB script windows installer COM object | PowerShell | |||
| What is the MIME type of Windows Powershell script files (.ps1 fil | PowerShell | |||
| Powershell or Windows Script | PowerShell | |||
| Powershell Script as Windows Service | PowerShell | |||