Since there have been some questions about this the last couple of days, I’ve started to put together a migration doc to go from Universal Dashboard to PowerShell Universal. I’ve also started to put together migration information for users that want to try UDv3.
The most up to date examples for UDv3 can be found on GitHub.
The goal is to make it as painless as possible to move from Universal Dashboard v2.9 to PowerShell Universal. The hope is that you can change minimal amounts of script within your dashboards and have them work in PSU using the UDv2 framework that is included.
If you run into issues with UDv2 in PSU, please file an issue.
Also, note that you can still run your dashboards for free within PSU. It has the same limitations that prevent authentication without a license but removes the remote access restriction. You’ll also have access to Universal Automation to run up to 25 jobs a day.
Are there any tutorials or guides for migrating Authorization Policies to PSU? I looked at the docs and i still don’t fully understand how i am supposed to migrate over from New-UDAuthorizationPolicies.
The $User object is of a different type now. That said, after writing this up, I think we should introduce a HasClaim method so you dont have to change this at all. I’ll put that on the backlog.
This is the structure of the $User object.
public class ClaimsPrincipal
{
public List<Claim> Claims { get; set; } = new List<Claim>();
public Identity Identity { get; set; } = new Identity();
}
public class Identity
{
public string Name { get ;set; }
}
public class Claim
{
public string Type { get; set; }
public string Value { get; set; }
public string ValueType { get; set; }
public string Issuer { get; set; }
public Dictionary<string, string> Properties { get; set; } = new Dictionary<string, string>();
}
Hi Adam, can you confirm that the automatic $Roles variable is implemented in PowerShell Universal release v.1.2.9?
User x is part of serveral roles (see logging), but the $Roles variable is empty.
[logging] [INF] Evaluting claims for user x (b92e9e9d) [INF] user x is part of role Administrator (2878f509) [INF] user x is part of role Operator (7a62f33c) [INF] user x is part of role Reader (4a0a48a3)
Just attempted migration of a UD 2.9.0 site to Universal on FW 2.9.1beta6, following the doc,
I noticed that some items were not listed which I have had to remove from new-uddashboard:
-AdminModeAuthorizationPolicy
-IdleTimeout
-NavBarLogo
-NavBarColor
However after doing this I appear to be stuck (dashboard still wont start), I’m not getting anything tangible in my log to work with either:
[07-23-20 12:11:23 AM] Creating services.
[07-23-20 12:11:23 AM] Starting scheduler. [07-23-20 12:11:24 AM] Failed to get dashboard. One or more errors occurred.
[07-23-20 12:11:24 AM] Dashboard configuration complete.
That’s a new one. It looks like it’s throwing some error while configuring the scheduler. Configuring the scheduler is about the last thing it does before starting up.
Are you using scheduled endpoints? I can get some better logging in there to unroll the aggregate exception that is being throw (One or more errors occurred).
Yeah it was the schedules, I’m dotsourcing a file for those so just commented it out for now and it started up. I’ll try to fiddle around with it a bit more and see if theres anything in particular thats causing the problem.
I just tried to access the page now that its running and i’m getting a blank white screen, nothing else in the log to show any errors etc. Also tried accessing a page directly in the url but it’s still the same. I’ll play about some more and let you know if I find the cause
It looks like one of the components is messed up. The style is not defined error is what is causing the issue. Somewhere, we are using the style variable without defining it. If you click the bundle.js:110 or line 236, you might get a hint as to what component is doing it. Unfortunately, it looks like your map files aren’t loading so it might be minified JavaScript code that it will point you to.
If you have some time to spare tomorrow, I’d be happy to do a quick Zoom so we can get to the bottom of this.
Hey, sorry I didn’t get chance to look at this earlier. Thanks for the pointers, I found that it was the ud footer, after commenting out it started up fine.