Page 1 of 1

Issues with Adding Modules to Powershell Multi Forms Application

Posted: Tue Sep 18, 2018 8:00 am
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.

Re: Issues with Adding Modules to Powershell Multi Forms Application

Posted: Tue Sep 18, 2018 8:23 am
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.