Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8494871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:24:58+00:00 2026-06-10T23:24:58+00:00

I have installed the release version of PowerShell v3 and am having some trouble

  • 0

I have installed the release version of PowerShell v3 and am having some trouble getting the -Version parameter to work. I have quite a few modules that require .NET 4.0, and I have been using PowerShell v2 without issue using the following powershell.exe.config file:

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

This would allow me to run PowerShell v2 with the .NET 4.0 CLR. Everything worked without issue.

I have now installed the release version of PowerShell v3, and anytime I use the command ‘powershell -version 2’ and check the $PSVersionTable variable, it shows that it has loaded PowerShell v3 (with .NET 4.0). If I remove the powershell.exe.config file above and run the same command, it shows that PowerShell v2 is loaded but is using .NET 2.0.

So my question is this: Is there a way to load PowerShell v2 and have it use the .NET 4.0 CLR like I used to do before installing PowerShell v3? Or does PowerShell v3 not allow this?

Also, I should mention why I’m trying to do this – mainly in case there are any incompatibility issues that might crop up when we switch to V3. I plan to test everything with V3, but having the ability to drop back to V2 can save us from a lot of headaches.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T23:25:00+00:00Added an answer on June 10, 2026 at 11:25 pm

    What’s happening is the following:

    • Start with -Version 2
    • Powershell starts, beings to bind to v2 runtime/assemblies. So far so good.
    • App.config indicates that .NET 4 runtime should be loaded
    • As assembly binding progresses, there is a .NET publisher policy that automatically redirects any app built against v2 to v3 when possible
      • This is normally what you want – if new version is available, automatically use it
    • Result is v3 runtime/assemblies are loaded, despite your original intention (and Powershell’s) to run v2.
      • This does not happen without the .NET 4 workaround, since v2 will load under .NET 2 by default, and thus it cannot be redirected by the publisher policy onto v3, which requires .NET 4.

    Simple, right?!

    So what you need to do, if you want to keep PSv2 on .NET 4, is manually disable the publisher policy. This can be done in the app.config file, see a related post here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just installed that latest stable release of TortoiseSVN on Windows Server 2003
I am having trouble getting MacPorts to function properly. I just installed OSX Lion
I have downloaded and installed the release version of ASP.NET MVC 3 (File version:
I have downloaded the ASP.NET MVC 2 Release version (using Web Platform Installer) as
I am using Windows Vista 32bit . I have installed Eclipse Helios Service Release
i've installed new sdk 3.2 pre-release wich have iPad simulator, i have tried to
I have installed Eclipse: Eclipse Java EE IDE for Web Developers. Version: Helios Service
I'm using Windows XP, TortoiseGit (latest version) and Cygwin. I have git.exe installed and
Does anyone have a chart showing which version of iOS people have installed on
Since I have installed the mvc4 RC, the razor autoresolve url that replaces ~

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.