.NET framework 4.5 but PowerShell 2.0

This topic contains 9 replies, has 2 voices, and was last updated by  Sigurd Skauvik 3 months, 3 weeks ago.

  • Author
    Posts
  • #90184

    Sigurd Skauvik
    Participant

    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

    Don Jones
    Keymaster

    What's $PSVersionTable say?

  • #90253

    Sigurd Skauvik
    Participant

    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

    Don Jones
    Keymaster

    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

    Sigurd Skauvik
    Participant

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

  • #90259

    Don Jones
    Keymaster

    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

    Sigurd Skauvik
    Participant

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

  • #90263

    Don Jones
    Keymaster

    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

    Sigurd Skauvik
    Participant

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

  • #90331

    Sigurd Skauvik
    Participant

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

You must be logged in to reply to this topic.