Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Contact
  • Reviews
  • Toggle search form
Home » Mac » How to upgrade PowerShell to the latest version on macOS via Homebrew
  • Screenshot 2020 12 06 at 17.01.38
    Start Print Spooler Service: How to fix Print Spooler Service not running Windows
  • mac2022df
    Best MacBook you can find in the year 2022 Reviews
  • Object First Honeypot OOTBI
    OOTBI Security Best Practices: Enable Honeypot on Object First Backup
  • Complete Guide on TestRail as a Test Management Tool   banner
    Complete Guide on TestRail as a Test Management Tool Security | Vulnerability Scans and Assessment
  • Fix error Microsoft Outlook cannot sign or encrypt this message when sending email.
    How to fix error “Microsoft Outlook cannot sign or encrypt this message” when sending email? Network | Monitoring
  • Upgrade for Veeam ONE
    How to upgrade Veeam ONE to v12.1 Backup
  • Ubuntu on Windows
    Install Ubuntu 20.04 LTS on Windows via WSL Linux
  • system
    How to fix the system cannot find the file specified when adding LP, LIP, and FoD packages to Windows Images Windows Server

How to upgrade PowerShell to the latest version on macOS via Homebrew

Posted on 15/04/202109/09/2023 Christian By Christian 4 Comments on How to upgrade PowerShell to the latest version on macOS via Homebrew
upgrade PowerShell

PowerShell is a cross-platform task automation solution that runs on Windows, Linux, and macOS. It includes a command-line shell, an associated scripting language, and a framework for processing cmdlets. There are several ways to install PowerShell on macOS. If you wish to install PowerShell via Homebrew package manager for macOS, please see “how to install and uninstall PowerShell on macOS“. I would also like to discuss Homebrew as it is a package manager on macOS. Homebrew is a package manager for Macs which makes installing lots of different software like Git, and Note++ easy. The steps below are ways to install PowerShell on macOS. Kindly refer to these guides on how to install Windows Package Manager (Winget CLI), how to install, upgrade and uninstall Chocolatey, how to install, upgrade and uninstall software with Chocolatey, and how to install applications Windows Package Manager-Winget CLI.

Note: PowerShell 7.1 is an in-place upgrade that removes PowerShell Core 6.x and 7.0. The /usr/local/microsoft/powershell/6 folder is replaced by /usr/local/microsoft/powershell/7. 
- If you need to run an older version of PowerShell core side-by-side with PowerShell 7.1, install the version you want using the binary archive method. When new versions of PowerShell are released, update Homebrew and upgrade PowerShell. As you can see below, there is a notice that PowerShell v7.1.0 is available and I am currently running v7.0.3.
latest version

Upgrade PowerShell to the latest version on macOS

Furthermore, Launch PowerShell using spotlight search. There are different ways to launch PowerShell on macOS. However, When new versions of PowerShell are released, you should update Homebrew’s formulae first, as shown below.
– Moreover, During the installation, you may be asked to fix the use of shallow clone due to its cost. just run the command as shown below.

brew update
macOS

Next, we will have to upgrade PowerShell. In addition, Because I installed PowerShell appending “cask” to it. Nonetheless, I will also upgrade PowerShell this way as it is recommended instead of just using “brew upgrade PowerShell”.

Whether you use the cask or the tap method, when updating to a newer version of PowerShell, use the same method you used to initially install PowerShell. If you use a different method, opening a new pwsh session will continue to use the older version of PowerShell. If you do decide to use different methods, there are ways to correct the issue using the Homebrew link method.
Homebrew

Consequently, Now the upgrade is complete. Similarly, The PowerShell shell must be exited and restarted to complete the upgrade and refresh the values shown in $PSVersionTable. You can use the below command as well.

pwsh
Screenshot-2021-04-15-at-03.41.51

For those of you who use the VS Code (visual code). Nevertheless, you just have to launch PowerShell and if there is an upgrade available, you will be prompted to upgrade as shown below.

brew upgrade powershell-preview --cask
Screenshot-2022-04-05-at-15.53.04

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Mac Tags:PowerShell, PowerShell version 7, PowerShellGet, Upgrade

Post navigation

Previous Post: Windows Server 2022 Capabilities: Register Windows Admin Center with Azure
Next Post: Configure VPN on Windows Server: How to allow remote VPN Access for Domain or Local Users

Related Posts

  • maxresdefault 2 7
    How to record your screen with PowerPoint and make slide shows Mac
  • Mendeley Error Code ACLx80sr
    Fix Mendeley Cite Error has occurred: ECITE40001 (ac1x80sr) JIRA|Confluence|Apps
  • sdadsf453423564
    How to download, install and activate, and uninstall IBM SPSS Statistics Mac
  • vvd
    Unable to connect to Eduroam WLAN: WiFi Username remembered on MAC Mac
  • Password Migration to ICloud Keychain
    How to import your Chrome or Firefox passwords into your iCloud Keychain Mac
  • Teams
    How to install Microsoft Teams on a macOS Mac

More Related Articles

maxresdefault 2 7 How to record your screen with PowerPoint and make slide shows Mac
Mendeley Error Code ACLx80sr Fix Mendeley Cite Error has occurred: ECITE40001 (ac1x80sr) JIRA|Confluence|Apps
sdadsf453423564 How to download, install and activate, and uninstall IBM SPSS Statistics Mac
vvd Unable to connect to Eduroam WLAN: WiFi Username remembered on MAC Mac
Password Migration to ICloud Keychain How to import your Chrome or Firefox passwords into your iCloud Keychain Mac
Teams How to install Microsoft Teams on a macOS Mac

Comments (4) on “How to upgrade PowerShell to the latest version on macOS via Homebrew”

  1. Avatar photo dunxd says:
    10/05/2021 at 12:05 PM

    I installed PowerShell on my Mac some time ago, and I don’t recall if I used cask or tap. How can I find that out?

    Log in to Reply
    1. chris Christian says:
      12/05/2022 at 8:49 PM

      I would say you must have probably used “cask”. On a Mac, these are the only way you must have installed PowerShell: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-macos?view=powershell-7.2

      Log in to Reply
  2. Avatar photo Dream says:
    12/05/2022 at 8:38 PM

    Thank you for this!!! Total noob at coding and was looking for the wording to put into terminal to upgrade powershell! Much appreciated!!

    Log in to Reply
    1. chris Christian says:
      12/05/2022 at 8:46 PM

      Thank you very much for the kind words. I am glad you found this guide very useful…

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Screenshot 2020 12 06 at 17.01.38
    Start Print Spooler Service: How to fix Print Spooler Service not running Windows
  • mac2022df
    Best MacBook you can find in the year 2022 Reviews
  • Object First Honeypot OOTBI
    OOTBI Security Best Practices: Enable Honeypot on Object First Backup
  • Complete Guide on TestRail as a Test Management Tool   banner
    Complete Guide on TestRail as a Test Management Tool Security | Vulnerability Scans and Assessment
  • Fix error Microsoft Outlook cannot sign or encrypt this message when sending email.
    How to fix error “Microsoft Outlook cannot sign or encrypt this message” when sending email? Network | Monitoring
  • Upgrade for Veeam ONE
    How to upgrade Veeam ONE to v12.1 Backup
  • Ubuntu on Windows
    Install Ubuntu 20.04 LTS on Windows via WSL Linux
  • system
    How to fix the system cannot find the file specified when adding LP, LIP, and FoD packages to Windows Images Windows Server

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,836 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.