/build/static/layout/Breadcrumb_cap_w.png

Admin Script Editor Script Packager Powershell ActiveDirectory Module

I need to package a PS script as an EXE.  The script calls the ActiveDirectory Module.
Works fine as a script.  Every time.  But when I package it and execute it I get:
jq715I.png

Maybe I'm wrong, but my only explanation for that is that the ActiveDirectory Module must not be loading.  So I tried specifically launching PS with Arguments -noexit -command import-module ActiveDirectory but no luck.  Tried putting the Arguments in quotes but no luck there either.


Any help here would be much appreciated!


Thanks!

1 Comment   [ + ] Show comment
  • This is not related to just that command.. it appears that the packaged powershell command is missing several modules.. seems to be may be only a V2 module... not sure. invoke-webrequest is missing as well. Same thing.. if I do not hide the console it works. - crysallis 8 years ago

Answers (1)

Posted by: talessi 8 years ago
White Belt
1
I've found the apparent cause of the issue... hiding the Console.
It appears that Modules will not Import without a visible Console.  My solution was to Import the Module, then hide the Console.

If anybody has any further information or solutions for this, I'd still love to know.


Thanks!
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ