Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Javatpoint Logo
Javatpoint Logo

What is Windows PowerShell?

Similarly asked questions

  • What is the purpose of PowerShell?
  • What is PowerShell in Windows?
  • Is Windows PowerShell the same as the command prompt?
  • Should I delete Windows PowerShell?
  • Is Windows PowerShell a virus?

Answer:

PowerShell is an open-source, object-oriented, cross-platform, task automation, and a configuration management framework developed by Microsoft. It is made up of a command-line shell and a scripting language and acts as a more powerful tool than the Command Prompt. It was developed by Microsoft to help IT professionals to configure systems and automate administrative tasks.

When it was developed by Microsoft, it was suppose to replace the Command Prompt, because of its power and control over the Windows operating system. The administrative tasks are performed by cmdlets in the PowerShell. It also facilitates administrators to get full access to COM, WMI, and perform administrative tasks on both local and remote Windows systems.

History of PowerShell

In November 2006, the first version of PowerShell was released for Windows XP, Windows Server 2003, and Windows Vista. The latest version of PowerShell is PowerShell 7, which is a replacement of the product for PowerShell Core 6.x products as well as Windows PowerShell 5.1. PowerShell 5.1, was its last supported version works with Windows Server 2008 R2, Windows Server 2012 and Windows Server 2012 R2, Windows 7 Service Pack 1 and Windows 8.1

Why is it called Windows PowerShell?

Microsoft developed PowerShell and was offered initially only with Windows. In 2016, Microsoft opened sourced it and made it available publically on Linux and macOS.

There are four types of commands that are used and executed by Windows PowerShell:

  • Cmdlets
  • PowerShell functions
  • PowerShell scripts
  • Executable programs

Key Features of Windows PowerShell 7

Microsoft extends the features of Windows PowerShell with every new version and updates. Here we discuss the added features in its latest version PowerShell 7. PowerShell 7.0 introduces a lot number of new features such as:

  • It has introduced some new operators:
    1. Ternary operator: a? b: c
    2. Pipeline chain operators: || and &&
    3. Null conditional operators: ?? and ??=
  • It is built on top of .NET Core 3.1 (LTS).
  • It has introduced automatic new version notifications.
  • PowerShell 7 facilitates you to invoke DSC resources directly.
  • You can easily investigate the errors as it provides a simplified and dynamic error view and Get-Error cmdlet for error investigation.
  • It provides a compatibility layer to enable users to import modules in an implicit Windows PowerShell session.

Where to find PowerShell in Windows?

Let's see how to open PowerShell (launch powerShell) in Windows. Follow the steps given below:

  • Click on the Cortana search bar right side the Windows 10 start menu. Now, type the keyword "powershell" and then click on the top result appeared on screen as Windows PowerShell. See the image below:
What is Windows PowerShell
  • After clicking on the "Windows PowerShell", a new popup window will open. It is the Windows PowerShell window where you can run cmdlets (pronounced command lets).
What is Windows PowerShell
  • If you want to launch Windows PowerShell as an administrator, right-click on the search result "Windows PowerShell" and then click on the "Run as administrator" See the below image:
What is Windows PowerShell
  • Now, it will open the Windows PowerShell as administrator.
What is Windows PowerShell

Launch PowerShell using the Run window

It is one of the simplest ways to start PowerShell in Windows PC. It can be used with all Windows versions. Use the following steps to run PowerShell by this method:

  • Press the Windows key + R keys simultaneously on your keyboard. It will open the Run Window. Now, type powershell and press the Enter button on the keyboard. Or, you can also click on the OK button.
What is Windows PowerShell
  • After clicking on the OK button, it will open the PowerShell window.
What is Windows PowerShell

Launch the Windows PowerShell from the Start Menu

We can also launch Windows PowerShell from the Start menu in Windows. This method is compatible with Windows 7 and Windows 10. It can also be used with the Start screen in Windows 8.1. Follow the steps given below to start PowerShell using this method:

  • Click on the Start Menu and go to the Windows PowerShell folder. Then, expand the Windows PowerShell folder, and you will see an icon for Windows PowerShell.
What is Windows PowerShell
  • Now, click on the circled option and it will open the Windows PowerShell.
What is Windows PowerShell

Launch PowerShell using its executable file

To launch PowerShell by using its executable files, if you are using Windows 10 or Windows 8.1, open the File Explorer, or use Windows 7, open Windows Explorer.

For 32-bit version of Windows:

Go to: "C:\Windows\System32\WindowsPowerShell\v1.0\."

Here you will find the powershell.exe file on 32-bits.

What is Windows PowerShell

For 64-bit version of Windows:

Go to: "C:\Windows\SysWOW64\WindowsPowerShell\v1.0\."

Here you will find the powershell.exe file on 64-bits.

What is Windows PowerShell

Open PowerShell from the Command Prompt

Follow the steps given below:

  • First, open Command prompt. To open the command prompt, type cmd on Cortana search bar and then click Enter button.
What is Windows PowerShell
  • After opening the command prompt, type start powershell and then press the Enter button on your keyboard. It will open Windows PowerShell automatically.
What is Windows PowerShell

Note: If you want to launch PowerShell as administrator by using this method, you should first open the Command Prompt as administrator.

What is Windows PowerShell





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA