LAPS PS module fails to import

7,121

https://tridion.stackexchange.com/questions/4497/import-module-could-not-load-file-or-assembly-when-running-2013-sp1-db-upgra and https://code.msdn.microsoft.com/windowsdesktop/Solution-for-management-of-ae44e789/view/Discussions/12 suggested that this problem (1) was caused by the PowerShell module being compiled for .NET Framework version 4 but, by default, PowerShell only loads .NET Framework version 2 and (2) could be resolved by creating file C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe.config with content:

<?xml version="1.0"?>
<configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0.30319"/>
        <supportedRuntime version="v2.0.50727"/>
        <supportedRuntime version="v4.6" />    
    </startup>
</configuration>

I verified that this resolved the problem.

Share:
7,121

Related videos on Youtube

mythofechelon
Author by

mythofechelon

Updated on September 18, 2022

Comments