Using another PS-Script from Dashborad no longer working

I have just upgraded Powershell Universal from 1.5.21 to 2.5.4.
From the dashbord I am using my cutomed library in this way.

$global:gSTRHOMEPATH = “C:\UniversalDashborad-PS”
Import-Module $gSTRHOMEPATH\Library2.psm1
$Pages += New-UDPage -Name ‘Ausbildergruppen’ -Url ‘/KL_ReadAll’ -Content {
*} *
New-UDDashboard -Title “Schülernetzverwaltung” -Pages $Pages

in KLReadAll.ps1 a function which is located in Library2.psm1 is called
$Group_TNNameArr = functionInLibrary2

This has been working until upgrading to 2.5.4. Now I get the error on this call $Group_TNNameArr = functionInLibrary2 :

Excepting calling “getSteppablePioeline” with “1” argument(s): "wrong Parameter"

in logs I found this “…Failed to read component module.”

Any help is hightly appreciated.

Can you verify that the environment you are running is the expected environment? This is a pretty low-level error and seems like it could happen if the PowerShell version changed.

If you are running in the Default environment in 2.5, it’s likely you are running in the Integrated environment. Try changing the environment of the dashboard to Windows PowerShell or PS7

Hello Adam,
thank you for your reply.
After changing the environment form default to Window Powershell 5.1 the Dashboard can no longer be started. :lying_face:
I installed PowerShell 7.2 and selected the environment 7.2.0 to my dashboard. The Dashboard can not be started either. Error: Dashboard 6; Request failed with status code 500

These are the choices
Window Powershell 5.1

With default or Integrated selected, the Dashboard can be started. But I get the error Excepting calling “getSteppablePioeline” with “1” argument(s): “wrong Parameter” again.

Please help and thank you in advance!

Hi @Hong,

Is there a chance that the “wrong Parameter” error is coming from your module, library2.psm1?

Can you launch a fresh dashboard without this module in the same configuration?

Dear Adam,
I create a fresh dashboard with the environment “default” and can reproduce the error:

This is the content of myLib.psm1
function myFunction{
$GroupArr = Get-ADGroup -Properties Name,department -Filter { name -like “_TN" -and name -notlike "Beendet_in_Betreuung” } `
-SearchBase $OU | sort-Object
Return $GroupArr.Name

option 1: myFunction is called by the Dashboard directly → no error

$gSTRHOMEPATH = “C:\UniversalDashborad-PS”
Import-Module $gSTRHOMEPATH\myLib.psm1
$myReturn = myFunction
$Pages += New-UDPage -Name 'My Page 1’ -Url ‘/MyPage1’ -Content {
New-UDTypography -Text “my Page 1”
New-UDDashboard -Title “Neutest” -Pages $Pages

option 2: myFunction is called within PS Script MyPage1.ps1 ->Error getSteppablePioeline” with “1” argument(s): “wrong Parameter” arises

$myReturn = myFunction
New-UDRow {
New-UDColumn -LargeSize 2 -SmallSize 2 -MediumSize 2 {
New-UDTypography -Text “hello” -Variant h6

I checked in this case my logfile, $GroupArr = Get-ADGroup … does´t return anything. It looks like that MyPage1.ps1 is not authorized to run Get-ADGroup

I also checked logs under C:\ProgramData\PowerShellUniversal.
In logs before upgrading to 2.5.4:
2021-11-18T00:00:00.8745079+01:00 0HMDA0T42MAOP:00000271 [INF] Request starting HTTP/1.1 GET application/json (ca22a1cb)
2021-11-18T00:00:00.8770404+01:00 0HMDA0T42MAOP:00000271 [INF] Successfully validated the token. (60169667)
2021-11-18T00:00:00.8771112+01:00 0HMDA0T42MAOP:00000271 [INF] Authorization was successful. (0d575a54) …

But after upgrading:
2021-11-30 11:00:12.103 +01:00 [INF] User profile is available. Using ‘C:\Users\\AppData\Local\ASP.NET\DataProtection-Keys’ as key repository and Windows DPAPI to encrypt keys at rest.
2021-11-30 11:00:38.731 +01:00 [ERR] Failed to read component module.
2021-11-30 11:00:40.113 +01:00 [ERR] Failed to read component module.
2021-11-30 11:00:58.924 +01:00 [ERR] Dashboard process is not running. Dashboard may have crashed or failed to start…

Is something missing? Did my upgrading run maybe incorrectly?
I really want to use the newest release, but I am not able to get it work.
Our company has purchased since september 2021 a license with support. How can I get a support faster?
Thank you a lot!