Disable Auto Reload - Breaks the ability for reload the configuration through api

Disable Auto Reload - Breaks the ability for reload the configuration through api

avatar
Product: PowerShell Universal
Version: 3.9.17


  • Set “Disable auto reload” to true
  • Invoke post for /api/v1/configuration
Invoke-RestMethod 'https://psu/api/v1/configuration' -Method 'POST' -Headers $headers -Body $body


The request spins. Not sure how this is “best practice” link to doc

The only way I can get the changes to reload is to bounce the PowerShellUniversal service, which doesn’t seem like the correct approach here.

Does everyone use the PSU UI to do their work?

All Comments (1)

avatar

I rarely use PSU UI, practically everything is done in the back end ps1 files for me.
My dashboards/apps are structured in a way that has my pages dot sourced, so that I can modify them on the fly, the only time I need to resync my config or restart my app is when changing roles (this is rare since I have them all defined and looking up from SQL tables), adding pages, modifying the menu or header.

Example:

New-UDPage -Name "pagename" -Content {
            . "fullpathtopagecontent.ps1"
        }


The dot sourced file is loaded every time the page is rendered, meaning you can make changes on the fly and refresh and you’re good to go.
I imagine you can do the same for endpoints and other aspects.

Also, on your original point, try using:
Sync-PSUConfiguration -Reset -Integrated