Migration from UD Service to IIS Hosting results in lost dashboards and functionality

First we installed the current version 1.5.14 of Powershell Universal by using the MSI File. Everything did run fine at port 5000.

Because the company policy force us to use IIS hosting for any web application we tried to setup the IIS Hosting. We followed the procedure Adam has given in the documentation and the hints of various Topics out of this forum.

In the end we stopped the service Powershell Universal and set his status to deactivated. After a reboot we started Powershell Universal through IIS by Http://localhost:5000

Login Screen appeared and we could login as admin.

Some of our already implemented dashboard wasn’t seen anymore. Even more surprising was the fact that we couldn’t start any dashboard out of the list.

The application pool owner has Full Control to the unzipped Powershell Universal directory and to the relevant directories beneath ProgrammeData ( default installation ).

The dashboards have all been running without any problem with Powershell Universal service installation.

Any suggestion or hint how to solve this problem ?

Product: PowerShell Universal
Version: 1.5.14

Can you provide any of your PSU logs? Perhaps they could provide some insight into what is happening here.

Yes I will provide one here. It will take a little bit of time

1 Like

you need first when you unzip the IIS files to also unblock them by using the following command in powershell

gci -path ‘location of unzip files’ -Recurse | Unblock-File

stop apppool and site
delete powershell universal & universal dashboard folders from c:\programdata
start apppool & site
re import your dashboards files from admin panel

1 Like

The files are unblocked and the app pool and sit is restarted before each test.

No change in behavior

After looking at the log file we found the reason for missing dashboards:

During startup of Powershell Universal there is one script dashboards.ps1 executed. This script starts all defined dashboards by using one line with new-psudashboard -Name …

In case of a corrupt entry ( for example path no longer available ) it throws an execption and doesn’t load any further dashboard following this line.

Okay we can easily fix

Now Powershell Universal is running under control of IIS .

I can access login page and login . I see all my dashboards.

But I can’t start any dashboard

No entries in event log except special login “dashboard usr” with all mentioned user rights

Have you recursively granted permissions to all of the Universal files to IUSR / IIS_IUSRS?

Next try:

I stopped appall and site
delete PowershellUniversal and Universal from Programdata
Restart apppol and site
login as admin OK
List of dashboard empty as expected
import dashboard Okay
Start of dashboard not possible

how many dashboards you have and have you tried to start a simple dashboard with just hello world for example to verify that dashboard works fine and if it is working then you need to address your code and find out what causes the issue based on logs.

1 Like

During my last try the list of dashboard was empty ! I used a very simple script from Adam for my dashboard without port specification and with -port 5000

$MyDashboard = New-UDDashboard -Title "Hello, World" -Content {
    New-UDCard -Title "Hello, Universal Dashboard" 
Start-UDDashboard   -Dashboard $MyDashboard

Yes the app pool User has Full Control for all relevant directories and the user has
logon as a service, logon as a batch, adjust memory, replace token as mentioned in the documentation

It is not the problem of the underlying script.

Please excuse the typo: The -wait parameter is there but missing above

what framework you are using, there is no -wait anymore for v3

Yes I know. But without a better solution I gave it a try.

All three scripts didn’t start

this is how your dashboard code should be try this one as example

New-UDDashboard -Title 'My New Dashboard' -Content {
    New-UDTypography -Text 'Hello!'

Yes you can do it that way too. But the script still doesn’t start
It is not the problem of the script. The script is running if you are using PowershellUniversal as a service and you cab start and stop from admin UI

what script you are referring to? do you have a dashboard script can you post the code ?



Have you recursively granted permissions to all of the Universal files to IUSR / IIS_IUSRS ?

You never responded to this question. Can you share your Web.config and AppSettings.json?

My apppool is running under a separate identity. I recursively granted permissions (full control) to all of Universal files to this identity .

This identity has special user rights logon as a batch, adjust Memory, Replace token , logon as a service

Can you grab a log? It seems like if you cant start dashboards there should be some errors in the log.

%ProgramData%\PowerShellUniversal by default

1 Like

I already looked at the log. There is no error and no warning. There are only entries with INF and DBG.

I am preparing an anonymous version of the log file. It will take a little bit.