• Powershell versions

    Author
    Topic
    #2683508

    I ran Powershell, and it told me to upgrade, which I did.  But how do I know that that is the “only version” of PShell on my computer, because I think I saw even 5.x poking around after the install.  It is 7.4.3 that I just installed.

    Or, how do I know that the version I just installed will be the one called as the default version?

     

    Chuck Billow

    1 user thanked author for this post.
    Viewing 2 reply threads
    Author
    Replies
    • #2683521

      Open PowerShell (I always open an Admin one)
      Enter $PSHOME at the prompt and press the Enter key.
      This will give the Path to the folder that the PowerShell.exe that is running the current PowerShell window (aka: the default one) is located.
      Go to that folder and you will see the PowerShell.exe files
      There will be more than one PowerShell.exe files with one labeled powershell_ISE.exe.  You are using the powershell.exe (without the ISE)
      You can right click the powershell.exe file and select Properties. The Details tab will give you the version number for that file and thus the version number of the default powershell.exe that you opened.

       

      HTH, Dana:))

      1 user thanked author for this post.
    • #2683565

      The 5.x version is called Windows PowerShell and is included in the Windows OS release. The 7.x version is the latest cross platform version and is the way of the future for PS. PS7 is installed and serviced separately from Windows. The $PShome variable shows the path for the PowerShell context you are in. It does NOT show the default for the system. If you want to know the default for the PS1 file type use Settings | Apps | Default Apps to check what app opens that file type.

      If you use Win+R and type Powershell.exe you’ll get Windows PowerShell. If you want PS7 use pwsh.exe. When you open Windows PowerShell the first line output says “Windows Powershell”. When you open PowerShell 7 the first line output says “PowerShell 7.x.x” (the current installed version of PS7).

       

      --Joe

    • #2683647

      Okay, thanks guys.

      Chuck Billow

    Viewing 2 reply threads
    Reply To: Powershell versions

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: