V7 0 4 is a patch release of PowerShell 7, the cross-platform shell and scripting language from Microsoft, issued in early 2021. It fixes bugs and improves stability for users on Windows, macOS, and Linux, and it is a free, open-source update you can install from GitHub or the Microsoft package repositories.
Background: What Is PowerShell 7?
PowerShell 7 is the modern, cross-platform successor to Windows PowerShell 5.1. It is built on .NET Core (later .NET 5+), which lets it run on Linux and macOS in addition to Windows. Microsoft announced PowerShell 7 as the replacement for Windows PowerShell, with a promise of long-term support for version 7.2 and later. The version numbering follows the pattern: major.minor.patch, so 7.0.4 is the fourth patch release in the 7.0 series.
The 7.0 series was the first LTS (Long-Term Servicing) release of PowerShell, with support lasting until December 2022. Patch releases like 7.0.4 were meant to address specific issues without introducing new features, making them safe to adopt in production.
What Changed in 7.0.4
The official changelog for 7.0.4 lists a handful of fixes. Key items include:
- Fixed a bug where the
Get-Datecmdlet could not parse certain date strings on some systems. - Resolved an issue with
Start-Jobthat caused a crash when using the-WorkingDirectoryparameter. - Improved the behavior of
ForEach-Object -Parallelwhen the script block contained areturnstatement. - Corrected a problem where the
Invoke-RestMethodcmdlet did not handle HTTP 204 No Content responses correctly. - Fixed a memory leak in the
PSReadLinemodule that could occur after long interactive sessions.
These fixes were targeted at real-world issues reported by the community. None of them were breaking changes, so scripts that worked on 7.0.3 should continue to work on 7.0.4.
How to Check Your Current Version
Before updating, you may want to see which version you have. Open a terminal (PowerShell, Command Prompt, or a Linux/macOS shell) and run:
$PSVersionTable.PSVersion
This returns a System.Version object with the major, minor, build, and revision numbers. For 7.0.4, it should display 7.0.4. You can also use Get-Version in older versions, but $PSVersionTable is the standard.
How to Install or Update to 7.0.4
The installation method depends on your operating system. Here are the common ways:
Windows
- If you installed via MSI, download the
PowerShell-7.0.4-win-x64.msifrom the GitHub release page and run it. The installer will replace the existing 7.0.x installation. - If you used
winget, runwinget upgrade Microsoft.PowerShell. - If you used the Microsoft Store, the Store will update automatically, but you can check for updates manually.
Linux (Ubuntu/Debian)
- If you installed via the Microsoft repository, run
sudo apt update && sudo apt install -y powershell. - If you used a direct .deb package, download it and run
sudo dpkg -i powershell_7.0.4-1.ubuntu.20.04_amd64.deb.
macOS
- If you used Homebrew, run
brew upgrade powershell. - If you used the PKG installer, download and run the package from GitHub.
After updating, restart your terminal and verify the version again.
Common Problems and How to Avoid Them
Updating PowerShell is usually smooth, but a few issues can arise:
- Execution policy blocks scripts: On Windows, you may need to set the execution policy to
RemoteSignedorBypassto run local scripts. UseSet-ExecutionPolicy RemoteSigned -Scope CurrentUser. - Module compatibility: Some modules written for Windows PowerShell 5.1 may not work in 7.0.4. Check if the module has a version that supports .NET Core. You can use
Find-Moduleto see if a cross-platform version exists. - DLL conflicts: If you have multiple PowerShell versions installed, you may get errors about conflicting assemblies. A clean install of 7.0.4 usually resolves this.
- Missing dependencies on Linux: If you get an error about libicu or libssl, install the required packages from your distribution’s repository. The GitHub release page lists the dependencies.
Why You Should Update Even If It’s a Patch
Patch releases are not just about new features; they are about stability and security. The fixes in 7.0.4 address bugs that could cause crashes or data corruption in edge cases. For example, the Get-Date parsing fix affects scripts that rely on date input from external sources. The memory leak in PSReadLine could degrade performance in long-running sessions. By staying current, you reduce the risk of encountering these issues.
Also, if you plan to eventually move to PowerShell 7.2 LTS, keeping your 7.0.x version patched ensures a smoother upgrade path.
How to Roll Back if Something Breaks
If you update and find that a critical script stops working, you can roll back to the previous version. The process depends on your OS:
- Windows: Uninstall 7.0.4 from Control Panel, then install 7.0.3 from the GitHub release page.
- Linux: Use your package manager to install the older version, e.g.,
sudo apt install powershell=7.0.3-1.ubuntu.20.04. - macOS: Use Homebrew to install a specific version:
brew install powershell@7.0.3(if available) or download the PKG manually.
Before rolling back, back up your profile and any modules you use, as they may be overwritten.
Frequently Asked Questions
Is 7.0.4 the latest version of PowerShell?
No, as of 2025, the latest stable versions are 7.4.x and 7.5.x. 7.0.4 was released in early 2021 and is no longer supported. You should use a supported version like 7.4 or 7.5 for production.
Can I run PowerShell 7.0.4 alongside Windows PowerShell 5.1?
Yes, they are separate installations. PowerShell 7 uses the pwsh executable, while Windows PowerShell uses powershell.exe. They can coexist without conflict.
Will my Windows PowerShell 5.1 scripts run in 7.0.4?
Mostly, but there are differences. Some cmdlets have changed behavior, and modules that rely on .NET Framework may not work. Use the WindowsCompatibility module to run many Windows-only modules, but not all.
How do I update PowerShell on Linux if I installed it via Snap?
If you used Snap, run sudo snap refresh powershell to get the latest version. Snap packages update automatically by default, so you may already have a newer version.
What is the difference between 7.0.4 and 7.1?
7.1 was a feature release that came after 7.0.4. It introduced new cmdlets like Get-ComputerInfo and improvements to the pipeline. 7.0.4 was a maintenance release with only bug fixes.
Is PowerShell 7.0.4 free?
Yes, PowerShell is open-source and free to use, whether for personal or commercial purposes. It is licensed under the MIT License.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Valheim Server Not Showing in Community List Fixes
- DisplayPort vs HDMI: Which Cable Should You Use?
- Soundbar vs 2.1 Speaker System: Which Is Better?
- Mouse Moving on Its Own? Causes & Fixes
- Slack Channels for Construction Projects: Setup Guide
- Surface Won’t Turn On: Quick Fixes1.8 h