[2026.3.5] Apps fail to start in Windows PowerShell 5.1 environments: UniversalDashboard.MaterialUI.psm1 does not parse under PS 5.1 ("The term 'New-UDApp' is not recognized")

[2026.3.5] Apps fail to start in Windows PowerShell 5.1 environments: UniversalDashboard.MaterialUI.psm1 does not parse under PS 5.1 ("The term 'New-UDApp' is not recognized")

avatar

Hello,


Product / version: PowerShell Universal 2026.3.5.0 (MSI), upgraded from 2026.3.3.0


Environment

- Windows Server 2022 (build 20348)

- Windows PowerShell 5.1.20348.4294, .NET Framework 4.8 (release 528449)

- PSU installed with the MSI as a Windows service, PostgreSQL backend for the PSU database

- The app is declared as follows:

New-PSUApp -Name "App" -FilePath "dashboards\App\App.ps1" -BaseUrl "/" -Environment "Windows PowerShell 5.1" -Authenticated -AutoDeploy


I have an app configured to run under the environment Windows PowerShell 5.1 and it fails to start after the upgrade to 2026.3.5.0.

The app log shows:

[Error] [App-App] Failed to get app. App was null. Make sure to return an app from your script.

[Error] [App-App] Startup: The term 'New-UDApp' is not recognized as the name of a cmdlet, function, script file, or operable program.

[Error] [App-App] Startup: The term 'New-UDIcon' is not recognized as the name of a cmdlet, function, script file, or operable program.

The same app starts without any problem when it is switched to the PowerShell 7 environment. It was working in 2026.3.3.0 under Windows PowerShell 5.1.


After Import-Module Universal in Windows PowerShell 5.1, the module exposes only 4 New-UD* commands (New-UDElement, New-UDEndpoint, New-UDEndpointSchedule, New-UDPage) and only 6 functions. In PowerShell 7 it exposes 129 New-UD* commands.


Universal.psm1 line 1 imports this file with errors suppressed:

Import-Module "$PSScriptRoot\UniversalDashboard.MaterialUI.psm1" -ErrorAction SilentlyContinue

Parsing UniversalDashboard.MaterialUI.psm1 with the Windows PowerShell 5.1 parser ([System.Management.Automation.Language.Parser]::ParseFile) returns 5 errors:

L3893: The hash literal was incomplete.
L3894: Unexpected token 'End' in expression or statement.
L3780: Missing closing '}' in statement block or type definition.
L3985: Unexpected token '}' in expression or statement.
L3986: Unexpected token '}' in expression or statement.


I used AI to help me troubleshoot this before opening a case, so, if this is incomplete, or if you need more information, feel free to ask.


Thank you in advance,


Axel

All Comments (1)

avatar

@acoutellier I can reproduce this. I've opened an issue to track it. We will get it resolved for the next release and get some regression tests in place to avoid this in the future. 

Adam Driscoll

PowerShell Expert and Software Architect at Devolutions