I was using the Get-LatestWMF5 function in the ISE on a Windows 2012 R2 (PowerShell version 4.0 by default) and it downloaded the wrong file 😦
I was using the [system.environment] .Net class to get the version of the Operating System.
It works fine in the console but not in the ISE.
There’s actually a change introduced the API that controls this behavior.
It’s documented on this page: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451%28v=vs.85%29.aspx
Windows PowerShell MVP Dave Wyatt provided this link. Thx Dave 🙂
I propose to replace the code that uses the