Know installed PowerShell Version on Mac

If you have installed PowerShell on your Mac, and you want to know which version are you on, follow the below commands on your terminal,

  1. Open Terminal App on your Mac (if you are using Macbook, press the F4 button to quickly launch it)
  2. Now type pwsh to move to the PowerShell shell.
  3. Here you need to execute $PSVersionTable table to display details about PowerShell.
    PS /Users/c2ctech> $PSVersionTable
    Name                           Value
    ----                           -----
    PSVersion                      7.3.4
    PSEdition                      Core
    GitCommitId                    7.3.4
    OS                             Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:35 PST 2023; root:xnu-8792…
    Platform                       Unix
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
    PSRemotingProtocolVersion      2.3
    WSManStackVersion              3.0
  4. The first line printed on the hashtable is the version of PowerShell on your Mac.

If you just want to display the version details, pipe the command with a grep and you just get the version.

PS /Users/c2ctech> $PSVersionTable | grep 'PSVersion'
PSVersion                      7.3.4
Know the version of PowerShell on Mac

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap