Product: PowerShell Universal Version: 1.4.6
I just wanted to post this on the forums as I was really lost on configuring the use of external modules until I reached out and support walked me through it.
So I had a script that relied on a module called PSGSuite, which serves as a wrapper for the Google API and provides Cmdlets for accessing various resources. PSGSuite relies on a configuration file to be created and stored on the system that is attempting to use it. Combining this with the additional configuration that is necessary to enable a third party module within PSU made for a good challenge.
To begin importing modules was truly much simpler than I was making it out to be. In my case, the ‘-PSModulePath’ parameter for the ‘New-PSUEnvironment’ Cmdlet turned out to be a lifesaver. Rather than directly moving these modules into the Repository directory (which is a bit of a workaround), I was able to point to the path where all of the installed modules live by default when they are initially installed. After adding that parameter, importing any of my third party modules using PSU began operating as expected.
As mentioned before, PSGSuite relies on a particular configuration file and without this file present it will not operate properly. I encountered a situation where I had the configuration file ready and working from the command line, however when I would try to use and PSGSuite Cmdlets in PSU, they would produce an error that indicated that it was missing credentials. To solve this, support suggested that I go into Windows Services and change the user that initiates the PowerShell Universal service over to the account that created the credentials. This is because by default the PSU service is started by a service account called “PSU$”. After doing so, and verifying that it was operating under this user, the credential file began being loaded in as I expected.
Hope this helps!