Moving UD to IIS

Happy new year all.

I’m trying to move UD over to IIS. I can get the dashboard started, but not sure where should I put other powershell modules which are used by the dashboard, like invoke-sqlcmd2, UniversalDashboard.UDCustomGauge etc?


I use one of two methods for the custom modules I import…I either install them on my IIS machine…or I copy the modules to the Modules folder on the actual folder directory of the new IIS site, then when I import the module, I have to specify the path where I placed them…the function you can just include on your dashboard.ps1 file and just make sure you use New-UDEndpointInitialization to import the functions, and modules into your IIS UD project:-

^^ This. When I moved to IIS I just made sure Invoke-Sqlcmd2 was installed on the webserver. It “just worked”.

I like to house all my modules inside my site directory under a custom folder, in my dashboard.ps1 I use get-childitem on this directory and import them all, followed by passing them into New-UDEndpointInitialization -modules.
The idea is that everything is self contained in the site. If I ever need to publish it on another server or restore to the same one, I can just configure a basic iis site, deploy the git repo and away I go. No need to worry about dependencies/reinstalling all my modules to the server again.

1 Like

What motivates one to host UD from IIS? Authentication?