How to Get Power Shell Version by running command in Power Shell of Microsoft Windows

Posted on

How to Get Power Shell Version by running command in Power Shell of Microsoft Windows

First of all, this article will only show how to get a version of a Power Shell. Power Shell is one of a command line interface exist in a device running using Microsoft Windows. Getting the version will be possible by running a command. The running command is possible to get the version of the Power Shell just by typing it. In other words, typing a certain command will run it and get a certain output. That output is the version of the Power Shell.

Table of Contents

Introduction

So, by running Power Shell and typing a certain command it is possible to get the version of the Power Shell itself. The following content will show how to do it step by step.

How to Get Power Shell Version by running command in Power Shell of Microsoft Windows

So, below is the step to achieve the purpose for getting the version of the Power Shell. Obviously, in order to do it as the first step will be just running the Power Shell. Normally, as one of the method for running the Power Shell will be just type ‘Power Shell’ from the search feature exist in Microsoft Windows. Below is the appearance of a Power Shell :

How to Get Power Shell Version by running command in Power Shell of Microsoft Windows
How to Get Power Shell Version by running command in Power Shell of Microsoft Windows

Get the version of Power Shell

The previous section is just running the Command Prompt,  setting or defining the environment variable. Following after, just check the value or the content of the environment variable :

  1. Using the running Power Shell available as it is exist or appear in the above seciton, just do the following step to get the version of the Power Shell with the following appearance :

    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
    
    PS C:\Users\Personal>
  2. Type a command for getting the version of the Power Shell. Below is the command for retrieving that kind of information :

    $PSVersionTable
  3. After typing the above command in the Power Shell console, it will actually appear as follows :

    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
    
    PS C:\Users\Personal> $PSVersionTable
    
  4. After typing the command, do not forget to press ‘Enter’ so it will be executed as follows :

    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
    
    PS C:\Users\Personal> $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
    
    PS C:\Users\Personal>

As it exist in the above output, the version of the Power Shell is ‘5.1.22621.2506’. Furthermore, the step actually exist in this link as a video content. It also exist in an embedded mode below :

Leave a Reply