Import Powershell Modules?

Mar 8, 2011 at 8:00 PM

Hi,

In the PowerGUI app you can import modules to make them available for writing powershell scripts. Is there any way to do this in the VSX? Mostly I am looking to enable intellisense for non-default modules.

Thanks!

Coordinator
Mar 8, 2011 at 10:00 PM

Hey Daunish,

You should be able to either import the module via the PowerGUI Script Editor or by using the Import-Module cmdlet. After that the necessary information should be in the runspace and IntelliSense should be provided. 

If that doesn't work let me know.

Adam

Mar 8, 2011 at 10:14 PM

Hi Adam,

Thanks for responding. I added the module through the PowerGUI Script Editor (previously I was adding it through PowerGUI itself), but I still don’t have Intellisense for that module within my Powershell Project. Is there anything else I need do to make sure it’s all linked up?

I closed the PowerGUI Script Editor, and Visual Studio before trying it out. When I open VS intellisense doesn’t work, and when I load up the Script Editor again I can see the module listed in the Powershell Libraries dialogue, however the module I imported isn’t selected anymore.

Any help you can provide would be great J

-D

From: adamdriscoll [email removed]
Sent: Tuesday, March 08, 2011 3:01 PM
To: Daunish M. Aboobaker
Subject: Re: Import Powershell Modules? [powerguivsx:248917]

From: adamdriscoll

Hey Daunish,

You should be able to either import the module via the PowerGUI Script Editor or by using the Import-Module cmdlet. After that the necessary information should be in the runspace and IntelliSense should be provided.

If that doesn't work let me know.

Adam

Coordinator
Mar 9, 2011 at 2:42 PM

Are you running an x64 operating system? You may need to run the x86 version of the PowerGUI Script Editor and import the module if this is the case.