Enhanced Publish-UDDashboard

I liked Publish-UDDashboard, but I needed and wanted additional functionality, so I super sized it.

This version fixes a few of the bugs of the original, but I haven’t thoroughly tested all code paths, so I probably introduced a few more.

Some of behavior and defaults are different: some are enhancements, some are because my way is better. :slight_smile:

It is designed for my use, and to live outside of the UD module, so it isn’t ready as is to plop into the UD GitHub as is, and I’m not going to do the work to make it ready or to make any compromise choices to do so. But I don’t mind if someone else does so.

This version allows you to set a custom service name, display name, description, startup type, and credentials. A switch parameter determines whether it will start the service after creating it. An existing service will not be overwritten unless you use the -Force switch. If the script file is not named “dashboard.ps1”, it will copy it, as needed, instead of throwing an error. The default target location is the location of the dashboard file, not the UD module (which was weird). You can specify the version of UD to use, in case you have multiple versions installed, and you need to use something other than the latest.

My immediate use for this was to install and run two different API dashboards (on different ports) on the same machine.

Full code here: https://gist.github.com/TimCurwick/8e7ad3f98731def6beb313a6073f83b1