Author Posts

March 3, 2016 at 7:04 pm

Wondering if anyone can reproduce this real quick, I think it's a bug or bug-like feature. with WMF5 installed, edit the PSModulepath system environment variable, and add a bogus network path on the end, something like "\\server\nopath". Then launch a new powershell session and see if basic functions like get-date, test-path and get-host all report that they aren't valid cmdlets.

Also if you run get-module -listavailable the output doesn't include the location sorting, and many of the built-in modules have no exported commands. It's like powershell sort of strokes out and can't find the other half of its brain or something.

Edit: I'm seeing this behavior on the WMF5 package for win7 and 2012R2, not sure if the windows 10 version is affected.

Edit2: Worth noting that since DSC runs as SYSTEM, and SYSTEM cannot typically access network folders, even a valid network path in the PSModulePath breaks most DSC functions, as many rely on things like test-path, get-wmiobject, etc.

March 7, 2016 at 2:01 pm

This issue is not just limited to WMF5. I just ran into it with WMF 4 on a fresh Hyper-V server 2012 R2 install. firmware update pooched the NIC and left me with an unreachable UNC path. this totally broke PowerShell