PowerShell Overview
Introduction
There are 2 types of PowerShell versions which can be present in a system. version 5.x
- Example: 5.1.22621.2506
which we call it as Windows PowerShell
or PowerShell Desktop Edition
and other is version 7.x and above
and we call it as PowerShell Core
- Example: 7.4.0
which can be run on Windows/Linux/Mac OS machines (platform independent).
How to Open PowerShell
Windows PowerShell
To Open, Search for
PowerShell
in Windows Search
In Windows 10:In Windows 11:
To Open, Select
Windows PowerShell
and Open
PowerShell Core
PowerShell Core is .NET Core version and platform independent. To run PowerShell Core Edition, we need to first install PowerShell Core in our system. Once its installed in the system then
Windows Terminal
If you have already installed Windows Terminal in Windows 10 or you are on Windows 11, you can open PowerShell from Windows Terminal as well.
To Open, Search for
Terminal
orWindows Terminal
in Windows SearchWe can select the PowerShell Edition directly we want to open (if both Windows/Desktop and Core Editions exist) or Open Terminal and then select the Profile we want to open by clicking on the expand button (down arrow)
Windows PowerShell ISE
Windows PowerShell ISE or Windows PowerShell Integrated Scripting Environment (ISE) is a scripting environment for PowerShell Desktop Edition. We can have an interactive session with script pane (editor) and Commands Pane.
To Open, Search for
PowerShell ISE
in Windows SearchSelect
PowerShell ISE
and Open
Retrieve PowerShell Version
To retrieve PowerShell version
- Open PowerShell
- Type the command
$PSVersionTable
and hit enter
We will see output something similar to this below output for Windows Powershell
and also we can see the PSEdition in the list is shown as Desktop
.
1
2
3
4
5
6
7
8
9
10
11
12
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.22621.2506
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.2506
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
We will see output something similar to this below output for Powershell Core
and also we can see the PSEdition in the list is shown as Core
.
1
2
3
4
5
6
7
8
9
10
11
12
13
$PSVersionTable
Name Value
---- -----
PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0