New-SPConfigurationDatabase Error Microsoft SharePoint is not supported with version 4.x.x.x of the Microsoft .Net Runtime

Wanneer je SharePoint 2010 (ja die oude) installeert op een omgeving waar PowerShell 3.0 is geïnstalleerd krijg je een foutmelding bij het aanmaken van de configuratie database.

PS> New-SPConfigurationDatabase

Error:

New-SPConfigurationDatabase : Microsoft SharePoint is not supported with version 4.x.x.x of the Microsoft .Net Runtime.

De oplossing voor dit probleem is vrij eenvoudig. Start PowerShell met elevated privileges en wijzig de PowerShell Engine met behulp van het volgende commando:

PowerShell.exe – Version 2 (Wijzigt de PowerShell Engine naar 2.0)

Nu kan je de configuratie database wel aanmaken.