I don't see how to add a module

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
DenverDenver
Posts: 15
Joined: Thu Nov 30, 2006 1:03 am

I don't see how to add a module

Post by DenverDenver » Fri Feb 22, 2019 9:19 am

I must be blind but I don't see options to add modules to profiles. -using the download demo, maybe it's not available in there? My goal is to auto-load the SCCM module. I realize I can modify my profile.ps1 but I guess I expect that's what this tool will help me do?

User avatar
brittneyr
Site Admin
Posts: 236
Joined: Thu Jun 01, 2017 7:20 am

Re: I don't see how to add a module

Post by brittneyr » Fri Feb 22, 2019 9:58 am

This feature is currently not available, but we will look into adding this.
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
DenverDenver
Posts: 15
Joined: Thu Nov 30, 2006 1:03 am

Re: I don't see how to add a module

Post by DenverDenver » Fri Feb 22, 2019 10:30 am

You might want to change your advertising for the product, eh?
"Install, remove or temporarily disable modules."

User avatar
Alexander Riedel
Posts: 7124
Joined: Tue May 29, 2007 4:43 pm

Re: I don't see how to add a module

Post by Alexander Riedel » Fri Feb 22, 2019 10:50 am

Thank you so much for your suggestion. The 'advertising' says nothing about profiles, so I don't think any change is warranted.
The term 'install' generally is agreed upon meaning to copy relevant files to a computer's hard drive, so that is what it does.
'Remove' is meant to imply "uninstall", which kind of makes sense, right? And 'temporarily disable' means to put the module where PowerShell won't load it.
None of this has anything to do with any profiles.
Now, I am certain our team will look at your suggestion and see what can be done about adding and removing this from profiles.
But as you probably know, PowerShell does load modules on demand when a cmdlet from an installed module is used, so there is no actual need to explicitly import a module in a profile. It might help clarity or performance, but it is not usually necessary.

Maybe you could elaborate on why you would want ModuleManager to add your modules to a profile?
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
DenverDenver
Posts: 15
Joined: Thu Nov 30, 2006 1:03 am

Re: I don't see how to add a module

Post by DenverDenver » Fri Feb 22, 2019 11:12 am

The term 'install' generally is agreed upon meaning to copy relevant files to a computer's hard drive, so that is what it does.
What would I be copying? How do I copy?
OK, How do I install modules? It's a module manager
Goal is to persistently load and maintain modules. kinda what I would expect "module manager" to do.

Bullet point 2 on your advertising:
"Install, remove or temporarily disable modules."
What part of install module am I missing?
https://www.sapien.com/assets/pdf/Power ... anager.pdf

Not trying to be difficult, just thinking that's what this is for, right? When I get this list of modules in MM when it fires up, where did the list come from? how do those modules get in there in the first place? They are not listed in any of my profile files.

User avatar
brittneyr
Site Admin
Posts: 236
Joined: Thu Jun 01, 2017 7:20 am

Re: I don't see how to add a module

Post by brittneyr » Fri Feb 22, 2019 11:47 am

You are not directly copying anything. When a module is installed, the correct files for the module are 'copied' to your machine from a registered repository.

To install a module, you open the Repository Search dialog (Home->Repository).
MMG_RespositorySearch.png
MMG_RespositorySearch.png (26.98 KiB) Viewed 1218 times
Search for the module you want to install and when you have found it, right-click and select Install or select the green download arrow:
MMG_Install.png
MMG_Install.png (80.42 KiB) Viewed 1218 times
The list you see when you start ModuleManager is generated from the cmdlet:
  1. Get-Module -listavailable
This shows all modules installed on your machine. Some of the modules might have been installed via other programs and some are system modules that are installed by default for PowerShell.
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
DenverDenver
Posts: 15
Joined: Thu Nov 30, 2006 1:03 am

Re: I don't see how to add a module

Post by DenverDenver » Fri Feb 22, 2019 12:21 pm

Yes! (I think) that's what I'm looking for..I'll give it a try asap

User avatar
DenverDenver
Posts: 15
Joined: Thu Nov 30, 2006 1:03 am

Re: I don't see how to add a module

Post by DenverDenver » Fri Feb 22, 2019 1:23 pm

So if I understand, it's less "installing" as "enabling installed"

Here's my issue: I have the SCCM client installed on my machine. That puts the SCCM module on the machine as well here:
C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager\ConfigurationManager.psd1

I copied that ConfigurationManager.psd1 to alllll te places I can find to make it available like:
C:\Program Files\WindowsPowerShell\Modules\ConfigurationManager\ConfigurationManager.psd1
or
C:\Users\DenverDenver\Documents\WindowsPowershell\Modules\ConfigurationManager\ConfigurationManager.psd1

But... I never see it when I run Get-Module -listavailable

I downloaded this tool (I also own the primal suite) to see if it could help me... am I close? I don't see it when I run repo search

Thanks so much!!

User avatar
brittneyr
Site Admin
Posts: 236
Joined: Thu Jun 01, 2017 7:20 am

Re: I don't see how to add a module

Post by brittneyr » Mon Feb 25, 2019 8:25 am

Its strange that it isn't being recognized. Try modifying the PSModulePath environment variable to include the original folder of the module. The PSModulePath environment variable stores the paths to the locations of the modules that are installed on disk.
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
DenverDenver
Posts: 15
Joined: Thu Nov 30, 2006 1:03 am

Re: I don't see how to add a module

Post by DenverDenver » Tue Feb 26, 2019 3:40 pm

Nope :/
Wish I had a better idea how the application is getting the list it has....
SQLServer is in there.. not sure where is came from but I think it must have installed with SSMS
The module I want is loading as part of my profile now -but it's not listed
BUT what is NOT in there: Active Directory module... but I use it all the time.
I'm not sure if "respositories" can include local module stores...