Powershell

Where is PowerShell located

PowerShell is an advanced level command-line application to automate various operations on Windows, macOS, and Linux. PowerShell is located in the Operating System’s drive of your machine. The location of PowerShell may vary from version to version of the PowerShell.

By default, Windows ships with the latest release of PowerShell 5. However, the PowerShell 7.2 is the latest LTS provided by Microsoft. PowerShell 5 and PowerShell 7 are located at different locations on your machine. This post describes various methods to locate PowerShell on windows and serves the following learning outcomes:

Where is PowerShell located

PowerShell is launched by using the powershell.exe file. The powershell.exe file can be searched and launched through multiple methods. In Windows-based operating systems, the PowerShell 7 and PowerShell 5 are in different directories. We have provided a step-by-step procedure to locate PowerShell 5 and PowerShell 7 on Windows.

How to locate PowerShell 5

PowerShell 5 supports thousands of cmdlets to perform various tasks on your system. It is also said to be the competitor of the PowerShell 7.2 (LTS). Here, you will learn to locate PowerShell 5 on your system.

Write the following address in the address bar of the Windows file explorer:

C:\Windows\System32\WindowsPowerShell\v1.0

Graphical user interface, application Description automatically generated

It is observed that the powershell.exe and powershell_ise.exe are located inside the folder.

How to locate PowerShell 7

Microsoft has recently launched PowerShell 7.2 LTS and the preview of PowerShell 7.3. PowerShell 7.2 (LTS) is equipped with the latest and advanced cmdlets.

You can head over to the PowerShell 7 ‘exe’ on the following address:

C:\Program Files\PowerShell\7

Graphical user interface, application Description automatically generated

You need to scroll down and find the “pwsh.exe” in the folder as can be seen above.

Note: There may be a possibility that the PowerShell 7 is installed in something other than the Operating System’s drive. In such a scenario, you can adopt the following steps to locate PowerShell 7.

Step 1: Open the search bar and write PowerShell 7.

Step 2: Upon finding PowerShell 7 in the search result, right-click on it and then click on the “Open file location” option.

This action will redirect you to the shortcut folder of the PowerShell 7. Select the PowerShell 7 and hit “ALT+ENTER” to navigate to the properties or you can right-click on it to go to properties.

You will get the list of properties where the path of the powershell.exe is given as can be seen below.

Here you go!

You can now locate PowerShell 7 if the target/path is not known.

How to launch PowerShell

The PowerShell can be launched from the start menu easily. Launching PowerShell every time from the directories is a tedious task. To ease this process, launch PowerShell’s instances as follows:

Open the search bar and type PowerShell. If you have installed PowerShell 7 as well then you will find the result as shown in the following image.

Graphical user interface, application Description automatically generated

From the result, it is observed that all the instances of PowerShell can be launched.

Conclusion

The default version of the PowerShell is located inside the Operating System’s drive. Other than the default versions can be located either in the OS’s drive or where the user has installed them. This post describes various ways to locate PowerShell 7 on Windows. Additionally, you have learned to launch PowerShell from the windows search bar as well.

About the author

Adnan Shabbir