Powershell Universal Service keeps stopping

Powershell Universal Service keeps stopping

avatar

we are pretty new customers and I do not have a ton of experience yet with this product.

installed on Windows Server 2025

I was writing some scripts and running tests yesterday fine.

I did install August Microsoft monthly updates yesterday afternoon. Now today when i'm in the portal trying to work it keeps locking up and I find the service is stopped.

I have tried restarting the service / restarting the server with no improvement.

I do see the following log on the server. ......

Faulting application name: Universal.Server.exe, version: 1.0.0.0, time stamp: 0x69970000
Faulting module name: coreclr.dll, version: 9.0.1426.11910, time stamp: 0x699753ca
Exception code: 0xc00000fd
Fault offset: 0x0000000000047037
Faulting process id: 0xC0C
Faulting application start time: 0x1DD35886A7A1D32
Faulting application path: C:\Program Files (x86)\Universal\Universal.Server.exe
Faulting module path: C:\Program Files (x86)\Universal\coreclr.dll
Report Id: 68b019eb-342e-4a82-82b0-a9cd8a2623eb
Faulting package full name:
Faulting package-relative application ID:


and since I got back into the portal and tried to work with it I have received this log about 15 times on the server....

The PowerShell Universal service terminated unexpectedly. It has done this 1 time(s). The following corrective action will be taken in 60000 milliseconds: Restart the service.

Anyone else seeing this after Microsoft Patching this month? It may not be that but it's the only thing that has changed since it seemed to work fine.

All Comments (3)

avatar

Hi @jdietz,

Please collect a dump the next time the PowerShell Universal service stops unexpectedly. Run the following in an elevated PowerShell prompt:

New-Item -ItemType Directory -Path C:\PSUDumps -Force

$dumpKey = 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\Universal.Server.exe'
New-Item -Path $dumpKey -Force | Out-Null
New-ItemProperty -Path $dumpKey -Name DumpFolder -PropertyType ExpandString -Value 'C:\PSUDumps' -Force
New-ItemProperty -Path $dumpKey -Name DumpType -PropertyType DWord -Value 2 -Force
New-ItemProperty -Path $dumpKey -Name DumpCount -PropertyType DWord -Value 3 -Force


This enables up to three full crash dumps for Universal.Server.exe. Once the service stops again, please securely provide:

  1. The newest .dmp file from C:\PSUDumps
  2. %ProgramData%\PowerShellUniversal\Logs\System\systemLog.txt
  3. Windows Application Event Log entries from the same time period


A full dump can contain sensitive data, so please do not attach it to a public forum post. If you could please email service@devolutions.net and ask for a folder to upload the memory dump, they will be able to provide it and I can analyze it.

Adam Driscoll
PowerShell Expert and Developer at Devolutions

avatar

Files are uploaded

avatar

Hey @jdietz ,

This appears to be an issue with the Microsoft Configuration Manager PowerShell console module causing a stack overflow exception within the PowerShell Universal server.

It's recursively calling this stack trace.

`AdminUI.PS.dll` → `CMPSCmdlet.GetSiteOperationalDetails` → `LogAdhocBug` → `ReportAdhocBug` → `GetOperationalDetails` → `GetSiteOperationalDetails`


It was loaded from:

C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\AdminUI.PS.dll

It appears that the assembly is attempting to perform error reporting, but the original exception wasn't included in the dump or event log entry. Because of that, I don't know root cause exactly. If you are using this module in your PowerShell scripts within PSU, I would recommend that you isolate it in a subprocess rather than running it within the integrated environment. This will prevent it from completely crashing the server. When configuring your scripts, you can set the environment to something like PowerShell 7 or Windows PowerShell 5.1, rather than Integrated or Default, if you haven't adjusted your default environment value.

If you cannot access PowerShell Universal due to this, you can always edit the scripts and configuration files in %ProgramData%\UniversalAutomation\Repository and then adjusting it to avoid loading the module until we can sort out why it causes PSU to crash.

If you could get the current version of the module in PowerShell, that would be helpful. You can run the following in a PowerShell terminal on the server to find out that information.

Get-Module -Name *Admin* -ListAvailable

Adam Driscoll
PowerShell Expert and Developer at Devolutions