.NET framework 4.5 but PowerShell 2.0

Welcome Forums General PowerShell Q&A .NET framework 4.5 but PowerShell 2.0

This topic contains 9 replies, has 2 voices, and was last updated by

 
Participant
11 months, 2 weeks ago.

  • Author
    Posts
  • #90184

    Participant
    Points: 0
    Rank: Member

    Hi! I have installed the newest .NET fram,ework on my machine. But still when i type get-host in PowerShell it say Version 2.0.
    Anyone had problems like that before? I never have, i hope someone have time to help out.

  • #90247

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    What's $PSVersionTable say?

  • #90253

    Participant
    Points: 0
    Rank: Member

    CLRVersion 2.0.50727.8762
    BuildVersion 6.1.7601.17514
    PSVersion 2.0
    WSManStackVersion 2.0
    PSCompatibleVersions {1.0, 2.0}
    SerializationVersion 1.1.0.1
    PSRemotingProtocolVersion 2.1

  • #90254

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    You've also got .NET 2.0 installed, and that's what PowerShell v2 is using. Not at all uncommon; different .NET versions can happily live side by side.

  • #90257

    Participant
    Points: 0
    Rank: Member

    How can i make it use 4.5 version of .NET framework?

  • #90259

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    You can't. .NET applications are compiled against a specific version of the Framework and typically work only with that version. If you want a newer version of PowerShell, you'll need to install it. That's separate from .NET.

  • #90260

    Participant
    Points: 0
    Rank: Member

    Can you provide a link for PowerShell? I am not sure how to work with this

  • #90263

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    Go to Microsoft.com/powershell. There's a tile on the page that links to installation downloads and instructions.

    You want to install the Windows Management Framework (WMF), and the site lists pre-requisites. Not every version of PowerShell is compatible with every version of Windows (Windows XP, for example, can't run anything past PowerShell v2). So you'll need to read and understand the pre-requisites before downloading anything.

    If you have an old version of Windows, particularly versions that are out of support, then you may not be able to install a newer version of PowerShell than what came with Windows. Microsoft doesn't provide support for older versions of Windows. I believe Windows 7 is the oldest version currently supported.

  • #90266

    Participant
    Points: 0
    Rank: Member

    I am trying to install the WMF 5.1 and see if it updates PowerShell, thanks.

  • #90331

    Participant
    Points: 0
    Rank: Member

    Thanks m8, WMF newest is downloaded and installed but i cannot reboot my computer yet, too much work going on 🙂

The topic ‘.NET framework 4.5 but PowerShell 2.0’ is closed to new replies.