Importing Modules to use in EndPoints

Hi all! I’m having issues trying to figure out how to import a module to use in various endpoints. I’ve found various information in the docs. I’ve attempted using New-UDEndpointInitialization -Module ‘.\module.psm1’ but when I try to use a function (Attempting with PSLiteDB) from the module, I’m able to see it fails each time by using Try/Catch blocks with Show-UDToast (how I typically troubleshoot in UD). I also tried to go down the route of using New-UDDashboard -EndPointInitialization but I can’t get that to work either. Failed to find any examples of this being used, only mentioned in the docs.

Can someone point me to an example dashboard on github that’s effectively importing and using a module? Thanks for any assistance that can be provided!

1 Like

@RandallEverhart What version of UD are you using?

There was an issue with this in 2.0 but should have been fixed in 2.1: https://github.com/ironmansoftware/universal-dashboard/issues/326

@adam I’m currently using UniversalDashboard.Community 2.2.0.

It’s probably an issue with me just not knowing exactly what to do here.

Just an update, I was finally able to get this working. It was my own misunderstanding!

Thanks for being active in here and helping people out.

2 Likes

What did you do to get it working? I am currently having the same issue.