For the Home windows working system, which incorporates Home windows XP (SP2), Home windows Server 2003 (r2 SP1), and Home windows Vista, PowerShell 1.0 was revealed in 2006. It’s a part of the.NET framework and contains the PowerShell ISE, a graphical software program.
Figuring out find out how to test your PowerShell model is useful whether or not you might be an skilled PowerShell consumer or simply getting began. On this information, we’ll present you find out how to accomplish that.
The best way to Verify the PowerShell Model in Home windows 10
Most Home windows 10 variations have Powershell 5.1. The model of PowerShell 7 (which is the most recent model of PowerShell) that’s usually put in on Home windows 10 computer systems is totally different from this one. Obtain the set up file or execute a PowerShell command in your pc to put in this model of PowerShell.
- $PSVersionTable.PSVersion Cmdlets
- (Get-Host).Model command line
- $host.Model property
- Registry (Home windows PowerShell solely)
1. $PSVersionTable.PSVersion Cmdlets
Figuring out your PowerShell model lets you know which capabilities can be found to you. We’ll display find out how to use a PowerShell command that exhibits the model quantity.
Along with returning the PowerShell model, the $PSVersionTable command additionally returns the ‘Version’. By the way in which, this command may even let you already know if PowerShell Core or PowerShell Desktop is at present executing.
To search out the model quantity, make the most of the PowerShell software itself.
- Begin by choosing the “Begin” menu, typing “Home windows PowerShell,” after which choosing the consequence from the search.
- Sort the next command and hit Enter within the PowerShell window that seems:
- Your PowerShell model is the primary worth listed below the “PSVersion” area, within the above instance it’s 5.1.
2. (Get-Host).Model command line
Hosts are an idea in PowerShell. A program internet hosting the PowerShell engine is known as a number. The PowerShell engine itself shouldn’t be the problem. PowerShell hosts embody a code editor with a built-in terminal or the PowerShell console.
- A completely separate model of PowerShell might exist on a number.
- You may see that (Get-Host).Model offers a model quantity that seems to be the PowerShell engine model when you run it.
- The model might not all the time match when working Get-Host in an built-in terminal.
- Though the host typically represents the identical model of the engine, this isn’t all the time the case.
3. $host.Model property
Citing the $host.Model can be used to find out the Powershell model. A built-in variable referred to as $host produces the identical outcomes as Get-Host.
$host.Model
This method has nothing distinctive about it. Merely put, it’s the identical as utilizing Get-Host.
4. Registry (Home windows PowerShell solely)
It’s also possible to test the registry when you don’t need to launch PowerShell. The registry key path has a price beneath which the PowerShell model is hidden:
HKLM:SOFTWAREMicrosoftPowerShell3PowerShellEngine.
You need to use Get-ItemProperty to seek advice from the PowerShellVersion worth that’s contained on this registry entry.
As you may see, this model is akin to the others however doesn’t have the revision.
How can I set up the most recent model of PowerShell in Home windows?
It’s possible you’ll set up a extra trendy and protected model of PowerShell utilizing a few the methods I’ll define for you.
1. Store Microsoft
You may simply seek for PowerShell within the Microsoft Retailer on Home windows 10 and Home windows 11. simply obtain the installer in your system and set up the most recent model of PowerShell.
2. WinGet
Out of your most well-liked command line/terminal, you may get the newest model utilizing the package deal supervisor WinGet.
The winget command can obtain PowerShell from quite a lot of sources, together with the Microsoft Retailer (msstore) and “winget.” I specify “winget” with the “-s” choice.
3. The knowledge freeway
You may get totally different PowerShell package deal varieties by looking the Microsoft Docs web site.