When .NET wants to be 4.5.2

Someone in the application group said that they wanted .NET downgraded from 4.5.2 to 4.51. I did as I was asked and then in the next few days, I got another call telling me that 4.5.2 was back.  The application they are running is not supported in 4.5.2.

This system isn’t managed by WSUS so Windows update did what it was designed to do.

Here is a link to block the update of .NET to 4.5.2:

How to temporarily block the installation of the .NET Framework 4.5.2

Be sure to backup the registry before you begin.

Browse to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\

Add a new Key called WU, then add a new DWORD value named BlockNetFramework452
Modify it and set it to 1.
Exit the registry.

 

 

Advertisements

Powershell Script with Spaces in the Path

I’ve been trying to write this script that has a path to a .dll with a space in it. Every example I came upon either used single quotes, double quotes or nothing at all.

I tried

Import-Module -name 'c:\program files\EqualLogic\bin\EqlPSTools.dll'

and

Import-Module -name "c:\program files\EqualLogic\bin\EqlPSTools.dll"

There are 2 ways that worked:

Import-Module -name c:\program` files\EqualLogic\bin\EqlPSTools.dll

Using the back tick character, below the tilde on a Windows keyboard. Not to be confused with the opening single quote.

keyboard

and

Import-Module -name ("c:\program files\EqualLogic\bin\EqlPSTools.dll")

For more on commonly confused characters, check out this page.