Please feel free to provide feedback or file bugs here.

Bug in WMF5 with inaccessible network path in PSModulePath environment variable

In WMF5, if the PSModulePath environment variable has a UNC Path in it that is currently inaccessible, powershell fails to load many built-in modules.

For instance, if PSModulePath looks like this:

C:\Users\jmmurrah\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules;\\badservername\folder

When powershell loads and times out trying to access the path, many standard cmdlets are not found; get-host, test-path, format-list, etc.

Get-member -listavailable reports back the modules, but does not list their path on disk, and many of them have no exported commands. When trying to import one of these modules powershell reports an error that the module path cannot be found.

This doesn't appear to happen with a bad local path, only with a network path.

7 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Jeremy Murrah shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base