Moving from UD to PU - Pages and custom urls with variables

So I’m finally moving from UD to the latest PU. The main issue I’m having now is that I have 1 page that is visible to users, they are prompted to put in a computername and click connect. Then it redirects to another page with a custom URL and Variable in that url that passes the computername. The new page takes that coputername and passes it into the scripts and displays the info.

Now in PU the new way to create a dashboard I have done the following.

$Pages = @()
$Pages += New-UDPage -Name 'Welcome' -Content {
    . "D:\PoshUniversalPages\Welcome.ps1"
} -NavigationLayout permanent

$Pages += New-UDPage -Name 'Manage Computer' -Content {
    . "D:\PoshUniversalPages\Manage-Computer.ps1"
} -NavigationLayout permanent

$Pages += New-UDPage -Name 'Get Computer' -Url /get-computer/:ComputerName -Content {
    . "D:\PoshUniversalPages\Get-Computer.ps1"
} -NavigationLayout permanent

New-UDDashboard -Title 'Webtools' -Pages $Pages

Welcome is just a welcome screen, super simple for now.

Manage Computer is the page that should be visible to the end user which asks for pcname and has the button to connect.

Get-Computer page should be hidden on the nav bar since it needs a variable sent to it to work. If i remove the page for get-computer then manage computer page doesnt work. I cant seem to get this to work like it used to in UD. Is that even possible anymore?

This is 100% a bug. I’ll make sure it gets resolved in 2.8.

The only current workaround is to do custom navigation.

OK phew, I thought I was going mad for a bit. Ill give the custom nav a go, thanks

1 Like