PowerShell 7 has been introduced in March 2020. It is the second version of PowerShell that is open-source and cross-platform which means that it is available now on Mac OS and different distributions of Linux.
The main objective was to permit IT admins to manage heterogeneous environments and hybrid public Clouds.
In top of that, one of the key features of this version is that it can live side-by-side with your default installation of PowerShell (5.x) without interfering with it in any ways.
The main reason behind that is that they run on different versions of .Net architecture. (.NET Framework 4.5 for the PowerShell 5.x and .NET Core 3.1 for PowerShell 7.x)
The following list reviews the new major features that come with PowerShell 7.0:
- Installs and runs side-by-side with Windows PowerShell.
- Improved compatibility with existing Windows PowerShell modules.
- New language features, like ternary operators and ForEach-Object -Parallel.
- Improved performance.
- SSH-based remoting.
- Cross-platform interoperability.
- Support for Docker containers.
PowerShell 7.0 can be run on the following OS:
As a final point for this little introduction, here are the main points that confirm the 2 PowerShell instances can coexist on the same Windows machine:
Separate installation path and executable name
- Separate PSModulePath
- Separate profiles for each version
- Improved module compatibility
- New remoting endpoints
- Group policy support
- Separate Event logs
External reference: Microsoft PowerShell Documentation
2. Download PowerShell 7:
- Go on the following URL: https://github.com/PowerShell/PowerShell/releases
- On that page you can see a detailed information about the release available for download
- To focus on the available download options you have, click on “Tags” button.
It will return a view like the following one (typically a more concise list).
Select the version you want to deploy on your machine. I strongly recommend you to deploy only the versions which are not marked as preview if you’re working on a production environment.
Click on “Downloads” button as shown here under.
Then you will get the following page with all the binaries you want for that specific version
Click on the name of the binaries which correspond most with the platform you will use PowerShell on. (In my case, Windows 10 64-bit)
3. Install PowerShell 7:
Launch the downloaded file:
Configure the location of the file:
Configure Options as you want:
I’ve added the option: “Add ‘Run with PowerShell 7’ context menu for PowerShell files.
In my case, I have added this option to permit me to evaluate the differences of behavior of my scripts between versions.
Run the installer:
If the installation is successful, you should be able to launch a PowerShell 7 console as shown here under:
4. Validation of the installation
The following screenshot confirms that I have 2 versions of PowerShell that can coexist on the same machine:
Now, have fun with the 2 versions!
I hope this post helped you,
Dont’ hesitate to comment, like or rate,
You can always reach me here: