2

Just installed management framework 5 production preview, my profile won't load anymore with the following error

Get-Module : Cannot load the module 'UserInfo.psm1' because the module nesting limit has been exceeded. Modules can only be nested to 10 levels. Evaluate and change the order in which you are loading modules to prevent exceeding the nesting limit, and then try running your script again.

Is there a way to get more details? I tried to trace execution with set-psdebug -trace 2, but I can't see the problem...

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
Loïc MICHEL
  • 24,935
  • 9
  • 74
  • 103

1 Answers1

0

Found it, I had same modules loaded from .psd1 RequiredModules = @('coresmac','activedirectory') and from the .psm1 #requires -modules ActiveDirectory,userinfo .

As the requires instruction appears as a comment it was quite easy to miss it ...

Loïc MICHEL
  • 24,935
  • 9
  • 74
  • 103