App pages - Generic questions

Product: PowerShell Universal
Version: 4.0.1

Just upgraded our test instance to 4.0.1, and have a few questions regarding the pages in Apps.

  1. If you create a new page and select “Use Designer”, the Delete button is then missing = you cant delete the page from the UI. Is this a brainfart from my side, or a bug?

  2. Is there a way to generically load all pages in the App / Dashboard, instead of having to manually specify them like this:

$Pages = @()
$Pages += New-UDPage -Name 'Home' -Content {
    New-UDGrid -Container -Content {
$Pages += Get-UDPage -Name "O365 - Mailbox Management"
$Pages += Get-UDPage -Name "AD - User Mgmt"
$Pages += Get-UDPage -Name "AD - Group Mgmt"

New-UDApp -Title "Test toolbox" -Pages $pages -Navigation $Navigation -NavigationLayout Permanent 

I have come for this answer, anyone know how to delete a page created with designer?

I’m very new to PSU myself, but my assumption is that the pages being passed to your New-UDApp is how they’re hierarchically under your app in the GUI.

Or another way to put it, the pages don’t have a parent UDApp, rather, the UDApp has child UDPages. So, if you didn’t list them here, there would be nothing else to tie the pages to the app.

Disclaimer: It is very likely I have no idea what I’m talking about :sweat_smile:

in the olden days we would do something like

Get-ChildItem -Path $PagesPath -Recurse -Filter *.ps1 |
ForEach-Object {
$Pages += . $_.FullName

New-UDApp -Title ‘Tools’ -Pages $Pages