July 5, 2025

USEFUL-IT

A blog for USEFUL-IT information

[PS]Bug: WMF5 RTM $env:PSModulePath

WMF 5 RTM

Microsoft released there PowerShell WMF 5 RTM. (link)

I found a issue after the installation of the WMF5 RTM version.

Great version a lot was fixed in this version, but all so one vital part was corrupted.

especially if you have third party Modules installed like SQL/HP/SCVMM/……


Before installation :

WFM5RTM-BeforeInstall

Make notice of the ($env:psmodulepath).split(‘;’) command there are 5 lines in this variable

C:\Users\sandwijkw\Documents\WindowsPowerShell\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\Windows\system32\WindowsPowerShell\V1.0\Modules\
D:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules\
D:\Program Files\Microsoft SQL Server\110\Tools\PowerShell\Modules\

Installed the WMF5 RTM on a Windows Server 2012 R2 with the latest patches installed (18-12-2015). Using the following file

W2K12R2-KB3094174-x64.msu

Source : https://www.microsoft.com/en-us/download/details.aspx?id=50395

After Installation and a reboot that is required.

After the reboot I was unable to load the SQL Modules anymore, so I did a check of the $env:PSModulePath and I found that the Path was reset to default.

WFM5RTM-AfterInstall

C:\Users\sandwijkw\Documents\WindowsPowerShell\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\Windows\system32\WindowsPowerShell\V1.0\Modules\

MISSING :
D:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules\
D:\Program Files\Microsoft SQL Server\110\Tools\PowerShell\Modules\

I recreated the $env:PSModulePath as it was before and all was OK again.

I filled a UserVoice with Microsoft : Here

[edit]Due the the above uservoice the download of the WMF5 has been removed.
the reason you can read here : link

About The Author