Issues with Adding Modules to Powershell Multi Forms Application

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
Bobby.Carter
Posts: 2
Last visit: Thu Oct 01, 2020 8:21 am

Issues with Adding Modules to Powershell Multi Forms Application

Post by Bobby.Carter »

I am trying to write a simple gui that connects to office 365. I have all the code to actually make the connection but i am having issues importing all of the modules that I need such as MSOnline, ActiveDirectory, and AzureAD. Also as a note i am going to deploy this to a few users when finished so if there is a way to package the application with the modules making a standalone application that would be good advise as well.

I receive an error for each of the modules above stating "The specified module was not loaded because no valid module file was found in any module directory." I have the import statements in my MainForm.psf file in the $mainform_Load.

Can someone please point me in the right direction?

I am able to import the modules to a native PowerShell window and connect to office 365(They are installed on my PC).

I am using Powershell Studio 2018.
Bobby.Carter
Posts: 2
Last visit: Thu Oct 01, 2020 8:21 am

Re: Issues with Adding Modules to Powershell Multi Forms Application

Post by Bobby.Carter »

I have resolved the issue of the modules not importing correctly. This is my newness to Sapien Studio coming out...There is a box in the upper left hand corner of Powershell Studio 2018 that lets you select the PSVersion. I had it set to PowerShell version 2 64bit...Once I set it to V5-64bit everything started working.

I still would like information about packaging the modules with the application for deployment.

Thanks for any help you can provide.
This topic is 5 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked