New-PSUApp is not recognized / Value Cannot be null, (Parameter 's')

Product: PowerShell Universal
Version: 3.9.10

EDIT: I seem to have fixed the errors from coming up by reverting back to PSU Version 3.9.9 and manually changing the Dashboard.ps1 back to New-PSUDashboard but the back to the original issue of no Modules being imported to the PS Envis.
It seems that after all this the Modules are loading on all the PS Envi’s now… Did I mess up the upgrade maybe?


Good morning,

I have broken my PSU instance and I’m at my wits end. Originally all I was trying to do was get EXO to connect from a Dashboard / Script but I was having major issues with the Identity Assembly not working. I could only get EXO to connect via an EndPoint on PS5 Envi, not on Scripts or Dashbaord no matter the environment I ran them under. Even though the EXO module worked without issues from the PSU server directly, on the same Envi PSU was using.

After a few attempts and days of trying to get this working, using a few similar posts here like this (ExchangeOnline module - Could not load file or assembly - #4 by adam), started messing with everything I could think of that might be causing the issue.

I updated all the modules and PowerShell Envi’s as well as PSU to the latest with no luck so I reverted back to the latest stable build (When I did this I attempted to try and change the account the service ran under but ended up re-installing the update and setting it back to the local service account).

After this none of my modules would load at all. I could see them on the server under Get-Module and I could use them find on any of the Envis directly on the server but PSU would not find or import them at all. I tried manually adding the module name and full path to the PSU Envi as well with no luck. After getting insanely frustrated again I removed the PS7 envi from the server completely and set PSU’s default envis back to integrated across the board with no change and then set it to PS5 envi, with no change.

I think this is where my major issues started. After this my Dashboards wouldn’t start and EndPoints kept saying there was a config error I needed to fix before I could see the API EndPoints page. I got all that working by cleaning up some stuff (Service account for example) and restarting the server/Service a couple of times.

Now, I am getting this error when I restart the service.

Invalid configuration: C:\ProgramData\UniversalAutomation\Repository.universal\dashboards.ps1: The term ‘New-PSUApp’ is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

as well as this error every minute or so.

Invalid configuration: endpoints.ps1: Value cannot be null. (Parameter ‘s’)

I tried uninstalling PSU completely, restarting the server then re-installing again but that has zero effect as well.

I really really do not want to start again, I had some issues getting OIDC auth working and a few other things on this network and I already have a lot of schedules and triggers (that admittedly aren’t working at the moment due to PSU refusing the find the module that work flawlessly…)

Please, any help to point me in the right direction to diagnose and fix this would be so amazing. It’s become one of those issues where I’m spend 20x longer trying to fix it then I should haha.

I’ve just noticed 3.9.11 being released, mentioning PSModules and external PowerShell hosts. Might want to upgrade!

I’m honestly scared to upgrade again haha. I seem to have got everything working without error by reverting back to 3.9.9 and manually changing the dashboard.ps1 back to a backup I had.

1 Like

I am back to my original issue with Exchange though haha… Should I start a new topic for this to keep the posts clean?

$Cert = Import-PfxCertificate -FilePath ($Secret:MSAuth_App_PathandPass).Username -CertStoreLocation Cert:\CurrentUser\My -Exportable -Password ($Secret:MSAuth_App_PathandPass).Password

Connect-ExchangeOnline -Certificate $Cert -Organization $OrganizationURL -AppId $MS_Auth_AppID 

[error] Could not load file or assembly ‘System.IdentityModel.Tokens.Jwt, Version=6.22.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’. Could not find or load a specific file. (0x80131621)

Using the exact same command / values from any Envi on the server directly works fine but only works on PS5 Envi from PSU, not PS7. Confirmed that PS7 Envi has the Exchange Module loading now at least.