Powershell import-module doesn't find modules

后端 未结 8 1073
暗喜
暗喜 2020-12-23 14:45

I\'m learning PowerShell and I\'m trying to build my own module library.

I\'ve written a simple module XMLHelpers.psm1 and put in my folder $home/

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-23 15:29

    I had this problem, but only in Visual Studio Code, not in ISE. Turns out I was using an x86 session in VSCode. I displayed the PowerShell Session Menu and switched to the x64 session, and all the modules began working without full paths. I am using Version 1.17.2, architecture x64 of VSCode. My modules were stored in the C:\Windows\System32\WindowsPowerShell\v1.0\Modules directory.

提交回复
热议问题