How to upgrade PowerShell version from 2.0 to 3.0

346,017

Solution 1

Download and install from http://www.microsoft.com/en-us/download/details.aspx?id=34595. You need Windows 7 SP1 though.

It's worth keeping in mind that PowerShell 3 on Windows 7 does not have all the cmdlets as PowerShell 3 on Windows 8. So you may still encounter cmdlets that are not present on your system.

Solution 2

The latest PowerShell version as of Sept 2015 is PowerShell 4.0. It's bundled with Windows Management Framework 4.0.

Here's the download page for PowerShelll 4.0 for all versions of Windows. For Windows 7, there are 2 links on that page, 1 for x64 and 1 for x86.

enter image description here

Solution 3

Just run this in a console.

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
cinst powershell

It installs the latest version using a Chocolatey repository.

Originally I was using command cinst powershell 3.0.20121027, but it looks like it later stopped working. Since this question is related to PowerShell 3.0 this was the right way. At this moment (June 26, 2014) cinst powershell refers to version 3.0 of PowerShell, and that may change in future.

See the Chocolatey PowerShell package page for details on what version will be installed.

Solution 4

  1. Install Chocolatey
  2. Run the following commands in CMD

    • choco install powershell

    • choco upgrade powershell

Solution 5

As of today, Windows PowerShell 5.1 is the latest version. It can be installed as part of Windows Management Framework 5.1. It was released in January 2017.

Quoting from the official Microsoft download page here.

Some of the new and updated features in this release include:

  • Constrained file copying to/from JEA endpoints
  • JEA support for Group Managed Service Accounts and Conditional Access Policies
  • PowerShell console support for VT100 and redirecting stdin with interactive input
  • Support for catalog signed modules in PowerShell Get
  • Specifying which module version to load in a script
  • Package Management cmdlet support for proxy servers
  • PowerShellGet cmdlet support for proxy servers
  • Improvements in PowerShell Script Debugging
  • Improvements in Desired State Configuration (DSC)
  • Improved PowerShell usage auditing using Transcription and Logging
  • New and updated cmdlets based on community feedback
Share:
346,017

Related videos on Youtube

Teppie
Author by

Teppie

Updated on August 20, 2021

Comments

  • Teppie
    Teppie over 2 years

    The OS that I am using is Windows 7, and the PowerShell version that is installed here is 2.0. Is it possible for me to upgrade it to version 3.0 or 4.0?

    Because there are cmdlets that version 2.0 can't recognize.

    • Joachim Isaksson
      Joachim Isaksson over 10 years
    • AminM
      AminM about 10 years
      @JoachimIsaksson i Use Win7SP1 build 7601...but my PS is 2.0
    • PhoneixS
      PhoneixS over 9 years
      @Teppie If one of the answer have solved your question, please mark it.
    • hatef
      hatef about 9 years
      You can get Windows Management Framework 4.0 (which includes PowerShell 4) here: microsoft.com/en-us/download/details.aspx?id=40855
  • Zoredache
    Zoredache about 10 years
    I didn't downvote, but running a script off some random URL without any script signing or anything sure seems like a good way to get your system PWN'd.
  • AgoHH
    AgoHH about 10 years
    You can check the script or save it locally and use the new URL.
  • David Murdoch
    David Murdoch almost 10 years
    "Unable to find package '3.0.20121027'"
  • AgoHH
    AgoHH almost 10 years
    Mhm.. find it on chocolatey index directly then
  • Shiva
    Shiva over 8 years
    I am on Windows 7 SP1 64x, and none of the 4 downloads on the page you've linked to "work". By that, I mean that when I run the installer, it says "This update is not applicable to your computer. " and I know from checking version that I am still on PowerShell 2.
  • prusswan
    prusswan over 8 years
    current version is 4. 3 is not available anymore
  • Mr_LinDowsMac
    Mr_LinDowsMac about 8 years
    Does it require reboot?
  • Shiva
    Shiva about 8 years
    I did it a long time ago, so don't remember if I had to restart, but per the installation instruction in the page I have linked to, it looks like you have to restart the computer. See 3rd line that says "Reboot the computer, start Windows PowerShell and verify that the output of $PSVersionTable shows 4.0 as the value of the PSVersion property"
  • razz
    razz almost 8 years
    There is powershell 5.0 now
  • Shiva
    Shiva almost 8 years
    @razzak I don't think PowerShell 5.0 Production version has been released. The latest version of Windows Management Framework from here microsoft.com/en-us/download/details.aspx?id=50395 says in it's release notes here msdn.microsoft.com/en-us/powershell/wmf/5.0/releasenotes that WMF 5.0 and PowerShell 5.0 is in the "Production Preview" state.
  • razz
    razz almost 8 years
    @Shiva I didn't notice that when I installed it, thanks for pointing it out.
  • Almund
    Almund over 7 years
    @Zoredache, True, you probably don't want to run scripts from the internet on your production environment :) however these packages on chocolatey are reasonably well adopted and the benefit outweighs the risk in the scenarios I've applied it. A serious production environment would probably have SCCM tooling anyhow. However, the current Chocolatey 'powershell' package now targets v5 of Powershell so if it is specifically v3 you want this won't cut it. Try version4 instead: choco install powershell4
  • AgoHH
    AgoHH about 7 years
    SCCM is IMO wrong solution for the job. Chocolatey packages can be offline - via Nexus/Artifactory or simply put them on share. You can inspect scripts before you do that in case you are concerned about security. Core chocolatey package are IMO more safe then some random package created in some company as those usually do not have expertise for creating safe packages.
  • Michiel Bugher
    Michiel Bugher over 6 years
    It is not necessary to install and upgrade. If Powershell is not already installed, upgrade will install the latest version. Also, if you want to add this to a script with no prompts, use the -y option
  • vml19
    vml19 about 6 years
    This option can work if you do not want to do windows update with microsoft.com/en-us/download/details.aspx?id=34595
  • mwfearnley
    mwfearnley about 6 years
    Looks like the link still works. Although it looks like they're up to v5.1 now: microsoft.com/en-us/download/details.aspx?id=54616, which still says it supports Windows 7 SP1 or higher.
  • RBT
    RBT almost 6 years
    @Zoredache I could understand the end result you're pointing to but what does PWN'd stand for?
  • Parv Bhasker
    Parv Bhasker almost 3 years
    Downloads for windows 7 are not longer available