locked
How to upgrade from powershell 2.0 to 3.0 on a 64bit machine RRS feed

  • Question

  • I have a requirement to upgrade Powershell from 2.0 to 3.0 on a 64-bit machine. I have few queries on this one.

    1. Do i have to completely uninstall 2.0 before i upgrade or the current 3.0 would be handling it automatically like for msi installer files?

    2. If any powershell sessions are active, how can we identify them in task manager. And when upgrading, will the active session of Powershell impacts it?

    3. After installation, how can i validate that Powershell upgraded to 3.0

    Thanks,

    Sivatej R.

    Wednesday, November 27, 2013 11:55 AM

Answers

  • Hi,
    You don't  need to uninstall PowerShell 2.0 inorder to install v3.
    Kill any PowerShell.exe running on your machine and stop the WinRM service to close any remote PSSessions , just in case.

    Only pre-requisite is that you need .NET Framework 4 or above installed before you update to v3.

    To validate your v3 install open a PowerShell console and type in

    $PSVersionTable

    You will get the below output , where PSVersion is your PowerShell evrsion, CLR Version is .NET Framework version etc.

    Name Value ---- ----- PSVersion 3.0 WSManStackVersion 3.0 SerializationVersion 1.1.0.1 CLRVersion 4.0.30319.17929

    BuildVersion                   6.3.9600.16406                                  
    PSCompatibleVersions           {1.0, 2.0, 3.0}                            
    PSRemotingProtocolVersion      2.2 
         Hope it helps


    Knowledge is Power{Shell}.






    Wednesday, November 27, 2013 1:25 PM
  • Hi,

    Just to add to Dexter's answer, here's a direct link to the 3.0 download:

    http://www.microsoft.com/en-us/download/details.aspx?id=34595

    Make sure you look over the System Requirements section, there are still some products that are completely incompatible with 3.0+.


    Don't retire TechNet! - (Maybe there's still a chance for hope, over 12,420+ strong and growing)

    • Marked as answer by Michael_LS Friday, November 29, 2013 9:08 AM
    Wednesday, November 27, 2013 1:38 PM

All replies

  • Hi,
    You don't  need to uninstall PowerShell 2.0 inorder to install v3.
    Kill any PowerShell.exe running on your machine and stop the WinRM service to close any remote PSSessions , just in case.

    Only pre-requisite is that you need .NET Framework 4 or above installed before you update to v3.

    To validate your v3 install open a PowerShell console and type in

    $PSVersionTable

    You will get the below output , where PSVersion is your PowerShell evrsion, CLR Version is .NET Framework version etc.

    Name Value ---- ----- PSVersion 3.0 WSManStackVersion 3.0 SerializationVersion 1.1.0.1 CLRVersion 4.0.30319.17929

    BuildVersion                   6.3.9600.16406                                  
    PSCompatibleVersions           {1.0, 2.0, 3.0}                            
    PSRemotingProtocolVersion      2.2 
         Hope it helps


    Knowledge is Power{Shell}.






    Wednesday, November 27, 2013 1:25 PM
  • Hi,

    Just to add to Dexter's answer, here's a direct link to the 3.0 download:

    http://www.microsoft.com/en-us/download/details.aspx?id=34595

    Make sure you look over the System Requirements section, there are still some products that are completely incompatible with 3.0+.


    Don't retire TechNet! - (Maybe there's still a chance for hope, over 12,420+ strong and growing)

    • Marked as answer by Michael_LS Friday, November 29, 2013 9:08 AM
    Wednesday, November 27, 2013 1:38 PM
  • Thanks Mike,

    I just remembered , forgot to add the download link...came back to check and it was there.
    Cheers to the awesome PowerShell community :)

    Knowledge is Power{Shell}.

    Wednesday, November 27, 2013 2:03 PM
  • Thanks Dexter and Mike.

    Forgive my Powershell knowledge as I basically work on application packaging. I have seen in some of the forums that the sessions may be active by dependent powershell scripts which are being executed by any application.

    In those cases, how can i identify if that script or a session is for sure a Poweshell one. Is there anyway i can relate it to a process which runs in taskmanager.

    Thanks,

    Sivatej R.

    Thursday, November 28, 2013 11:56 AM
  • You can look for the powershell.exe processes. Whenever you run a PowerShell script from another script, you'll see a powershell.exe process launched. Here's an example VBScript that will run a PowerShell "script" (which will pause so you can see the process in Task Manager):

    Set objShell = WScript.CreateObject("WScript.Shell")
    cmd = "powershell -command " + chr(34) + "pause" + chr(34)
    Set objExec = objShell.Exec(cmd)
    WScript.Echo objExec.ProcessID

    I've also included a popup with the PID to make the powershell process a bit easier to find.


    Don't retire TechNet! - (Maybe there's still a chance for hope, over 12,420+ strong and growing)


    Monday, December 2, 2013 1:07 AM