KB0025 - Universal Server fails to start automatically

KB0025 - Universal Server fails to start automatically

Applicability

This article applies to PowerShell Universal (Kestrel version*) running on Windows. If you have PowerShell Universal running under IIS or another OS then this article does not apply.

Symptom

Even though the PowerShell Universal service is set to 'Automatic' for Startup Type, the service is not actually started (pictured below) upon startup.



You observe events related to the PowerShellUniversal service with EventID 7000 or 7011 in the Event Log (System) that correlate to the last startup time[1].



Cause

Your server does not have enough resources/capacity to start PowerShell Universal within the default 30 seconds.

Resolution #1

The timeout value for waiting for services to start at boot time needs to be increased to something above the default 30 seconds[2].

1. Create the registry DWORD (32-bit) property named ServicesPipeTimeout under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
2. Set the value to a number higher than 30 seconds. In the example below, the value is set to 3 minutes (180,000 milliseconds).



3. Restart the server.
4. Confirm that the PowerShell Universal service is starting as expected on startup.
5. Confirm that EventID 7000 (or 7011) are no longer appearing in the System Log.

Resolution #2

You can try configuring the Recovery options of the service[3].



References


* This means the MSI version of PowerShell Universal (for Windows) which is a standalone application (Universal.Server.exe running as a service) whereas the ZIP version of PowerShell Universal (for Windows) is intended for integration with IIS.