VMware Cloud Community
pterlisten
Enthusiast
Enthusiast
Jump to solution

Autoloading PowerCLI modules does not work

Hi everybody,

I'm currently struggling with the PowerShell module autoload feature. Since PowerShell 3, the PowerShell is able to autoload modules. Chris Wahl has written a nice article about it (link). I can't remember if it ever worked for me, but I can observice this behaviour on two different deployments.

I'm using PowerShell 5 on Windows 8.1. I installed the latest PowerCLI 6.3. But I'm observing this also with PowerShell 4 on another client. The PowerCLI Module folder is part of my PSModulePath:

PS C:\Users\p.terlisten> $env:PSModulePath -split ';'

C:\Users\p.terlisten\Documents\WindowsPowerShell\Modules

C:\Program Files\WindowsPowerShell\Modules

C:\Windows\system32\WindowsPowerShell\v1.0\Modules

C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules

Regardless whatever I try: No PowerCLI module is imported automatically. The VMware PowerCLI modules are listed in the output of "Get-Module -ListAvailable". After importing VMware.VimAutomation.Core manually, other module are loaded automatically if used.

Any hint why this doesn't work?? Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

I had the same discussion, the autoload has never worked till now.

It will need a full conversion to modules afaik


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

I had the same discussion, the autoload has never worked till now.

It will need a full conversion to modules afaik


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
pterlisten
Enthusiast
Enthusiast
Jump to solution

Hi Luc,

hm... a pity. But good to know that I'm not the only one who has this problem. Smiley Happy

Thank you!

0 Kudos