How to Check What Version of Powershell I Have

PowerShell is ane of the most popular scripting languages and it is installed by default on all Windows operating systems starting from Windows 7 SP1. It consists of a Command Line Interface (CLI) and pre-programmed .NET classes called cmdlets, where each cmdlet performs a specific role.

Over the years, PowerShell's capabilities have increased and these are reflected in its many versions.

In this article, we will accept a detailed look at the development of PowerShell and what has changed in each of these versions. We follow this up with step-past-step instructions on how you can cheque the version yous have.

PowerShell Versions

PowerShell was showtime launched at the Professional Developers Conference that took place in Los Angeles in October 2003. Since then, there have been 9 versions, but the skillful news is all versions are astern compatible, which ways, you can install the later version of Windows PowerShell on older Windows computers.

Allow'due south now look through the features of each version.

PowerShell Version i.0

This was the showtime version that works on Windows XP SP2, Windows Server 2003 SP1, and Windows Vista. It was likewise a component of Windows Server 2008.

This was a fairly bones version that allowed users to go and gear up values with about 129 cmdlets.

PowerShell Version 2.0

The 2d version was a big bound over this first 1 as it had more than 632 cmdlets that reduced the corporeality of code required for executing a task. A significant improvement in this version was the breakpoints that made it easy to debug the script. Eventing, advanced features, remote management, background jobs, and a GUI-based PowerShell host were the other significant features in this PowerShell version.

It was released for Windows vii and Windows Server 2008 R2

PowerShell Version 3.0

From this version on, PowerShell was integrated with the Windows operating system. It was shipped with Windows 8 and Windows Server 2012. Microsoft too offered this version for Windows seven and Windows Server 2008 with service packs.

A salient feature of this version was that PowerShell became a part of the Windows Management Framework that has the WinRM service for remote management of devices. From this version, you can schedule jobs using the Windows Task Scheduler.

Session connectivity, automatic module detection, and new cmdlets are the other highlights.

PowerShell Version 4.0

This version was shipped with Windows 8.ane and Windows Server 2012 R2.

Information technology came with more features such as enhanced debugging, network diagnostics, and back up for the Where and ForEach loop.

PowerShell Version five.0

This version was released with Windows 10 and it supported object-oriented programming, as you lot tin apply the "class" keyword for programming. It included enums, OneGet, and more.

It supported Desired State Configuration (DSC) and Local Configuration Manager (LCM) along with their resource and fractional configurations.

PowerShell Version 5.1

This version was released with Windows 10 Ceremony Update.

A salient aspect of this PowerShell version is that it comes with ii editions – one for Desktop and the other for Core. The Desktop edition is a continuation of the traditional PowerShell editor while the Core edition runs but on .NET core and comes bundled with Windows Server 2016.

Some other notable aspect is this was the final version fabricated exclusively for Windows.

PowerShell Core six

From this version, PowerShell has get a cross-platform, gratis, and open up-source platform. It can exist used on Windows, macOS, and Linux with no modifications whatsoever.

This version is uniform with around 2000 existing cmdlets on Windows x and Windows Server 2019. Though it worked well on Linux, it was not well-received by Windows users.

Hence, Microsoft came up with minor upgrades and versions to enhance user experience, make improvements, and fix bugs.

PowerShell seven

This version was designed to supercede PowerShell 5.1 as the de facto version on Windows.

Some of its new features include pipeline and search operators, cmdlets, and improved compatibility with other built-in modules.

Equally you tin see, PowerShell has evolved from a simple scripting tool to an advanced cross-platform tool that empowers users to automate tasks and through it, meliorate their productivity with reduced effort.

Checking the PowerShell Version You Have

There are many ways to check which PowerShell version is installed in your organisation, so you can know if a detail feature is bachelor or not.

PowerShell Version Using the Host Control

One of the easiest options is to apply the "Host" command.

Open your command line and type "host" and this will list all the details nigh your PowerShell.

Await for the version information. This instance has PowerShell version 5.1.

PowerShell Version Using $PSVersionTable Variable

The second selection is to utilise a built-in variable called $PSVersionTable.

This variable checks the PowerShell Core'due south version.

You can likewise utilise this variable to know merely the major version of the installed PowerShell version.

To do this, utilise the command

$PSVersionTable.PSVersion.major

In this instance, this command returns the value "5".

PowerShell Version Using Registry Value

You lot can also apply the registry variable "HKLM\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine" to know the PowerShell version installed in your organisation.

Hither, you have two choices. You can either navigate to the registry through Windows Explorer and access the value of this registry variable or yous tin can use PowerShell's "Get-ItemProperty" cmdlet to go this value.

In the above example, use Get-ItemProperty \Windows\System32\Microsoft\PowerShell\v1.0\PowerShellEngine

This is the installed path of PowerShellEngine in this organisation. Change the path according to your setup. This works well in Windows eight and Windows Server 2012 and higher versions.

For earlier versions, use the -Path parameter.

Become-ItemProperty -Path \Windows\System32\Microsoft\PowerShell\v1.0\PowerShellEngine

The other manner is to open the Windows Registry and check the associated value.

Checking PowerShell Version in Remote Computers

PowerShell makes information technology piece of cake to cheque the PowerShell version on remote computers as well.

Y'all can utilize the "Invoke-Command" cmdlet to access this version number.

Invoke-Command -ComputerName comp1 -ScriptBlock {$PSVersionTable.PSVersion} -Credential $cred

This command volition run the $PSVersionTable.PSVersion control in the remote calculator called comp1 later logging in with the value of $cred.

You can as well extend this command to cheque from multiple remote computers. Send an array of values if you demand to get this information from many computers. You can also separate the values with commas and piping them to the "Invoke-Control" cmdlet.

Just make certain to print the computer proper noun, so y'all know which computer has what version.

Thus, these are different ways to check the PowerShell version installed in a organization.

Final Thoughts

To conclude, PowerShell is a built-in ubiquitous scripting language. Its versatility and ease of utilise brand it a popular option for automating configuration and maintenance tasks.

Due to this popularity, Microsoft has added more than features to PowerShell, and the consequence is most ix versions since the first was released in Oct 2003. Each of these versions is backward compatible as well.

Undoubtedly, the higher versions have more than capabilities, and nosotros hope the comparing of versions in this article will help you to know what'south currently available and which ones you must install for the capabilities you lot demand.

Lastly, we bear witness the different means past which y'all can check the current version installed in your system.

Nosotros hope this was an interesting read. Please share if you know other ways to bank check the PowerShell version installed in your system.

pullumofectown.blogspot.com

Source: https://techgenix.com/overview-of-powershell-versions-and-how-to-check-what-version-you-have/

0 Response to "How to Check What Version of Powershell I Have"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel