on-internet
← Community

Why does PowerShell throw error 1053 instantly when launching powershell.exe as a service?

Stack Overflow ·

Editor's note, to clarify why this question is programming-related: The premise is an existing PowerShell script that aims to implement a Windows service using the appropriate .NET APIs. However, using the PowerShell CLI (powershell.exe) in the service definition in order to call said script unexpectedly fails, before the script is even invoked, and the question is why. I'm trying to figure out why the service control manager can't launch PowerShell. When I try this with cmd.exe, it works. Of course it throws error 1053 when the process terminates after 10 seconds but that's normal because it'

Comments

Sign in or sign up to comment and upvote.

No comments yet.