App performance with a few MS modules

App performance with a few MS modules

avatar
(anonymous user)
Product: PowerShell Universal
Version: 5.6.5


We’ve created an App/Dashboard that requires several modules. I’ve read the article about caching Exchange on prem connection states, but I am wondering how this could/should be done for other MS modules: ActiveDirectory, Microsoft.Graph.Authentication, Microsoft.Graph.Groups, Microsoft.Graph.Users, MicrosoftTeams

I think my confusion arises from how PSU handles runspaces inside apps. It seems like sometimes components have access to the modules, other times they have to import them again. I’ve tried putting the import-module statements inside “New-UDApp” but also above it. The actions performed by the app all use a cert to connect to EXO, Graph, Teams, so it would be great if there was a way to speed up the loading time in some way.

Finally, is there a good order for importing all of these? It seems like EXO does not play nice with the others and gives an error at the bottom of the app.

All Comments (0)