How to open an elevated Powershell prompt
Microsoft bundles PowerShell, a command-line tool that administrators can use for managing their computers or other computers in a network.
Windows PowerShell, a Windows command line shell, is designed for system administrators. Microsoft explains that Windows PowerShell comes with an interactive prompt as well as a scripting tool which can be used separately or together.
Many PowerShell commands require elevated or administrative permissions, and you must launch an elevated PowerShell command to execute them.
This guide will show you two ways to run PowerShell as an administrator.
Method 1: Use the Windows 10 Start Menu context menu
You can launch administrative programs easily by right-clicking on the Windows 10 Start Menu. As shown below, this context menu includes an option named ‘Windows PowerShell Admin’.
Click on ‘Windows PowerShell Administrator’ to launch a PowerShell elevated prompt.
Windows 10 now displays a UAC prompt, asking you if the program should be given elevated permissions. At this prompt, click ‘Yes‘.
A PowerShell elevated prompt will now appear. The elevated prompt will open with the directory C:WindowsSystem32 as the start directory and the title ‘Administrator Windows PowerShell.’
When done using the prompt, you can close it by clicking on the X or by typing ‘exit’ and then pressing enter.
Method 2: Launch PowerShell from elevated command prompt
If you have an elevated command prompt already open, you can launch a PowerShell shell within it by simply typing ‘powershell‘ and pressing enter.
The PowerShell prompt looks slightly different when launched this way. It is not blue and runs as a shell underneath the regular command prompt.
Enter ‘Exit‘ to return to the elevated command prompt.