Since 2006, Microsoft has provided a PowerShell command-line shell that administrators can use to manage their computers and other computers on the network.
“Windows PowerShell is a Windows command-line shell designed specifically for system administrators. Windows PowerShell includes an interactive prompt and a scripting environment that can be used independently or in combination,” explains Microsoft.
However, many PowerShell commands require elevated or administrator privileges, and in order to execute them, you need to run an elevated PowerShell command prompt.
This guide provides two methods that you can use to launch an elevated PowerShell administrator prompt.
Right-clicking the Windows 10 Start menu will bring up a context menu that allows you to quickly launch frequently used administrative programs.
This context menu includes an option called “Windows PowerShell (Admin)” as shown below.
To launch an elevated PowerShell prompt, click the Windows PowerShell (Admin) option.
Windows 10 will now display a UAC prompt asking if you want to give the program elevated permissions. Press ‘Yes‘ in this tooltip.
An elevated PowerShell prompt will open. You can tell it’s promoted because the home directory will be C:\Windows\System32 and the window title will be “Administrator: Windows PowerShell”.
When you’re done using a hint, you can close it by clicking X or typing “exit” and then hitting the enter key.
Method 2: Run PowerShell from an elevated command prompt
If you already have an elevated command prompt open, you can start a PowerShell shell from it by simply typing ‘powershell‘ and pressing enter.
When launched this way, the PowerShell command prompt will look slightly different because the background will not be blue, and it will run as a shell within a normal command prompt.
To return to an elevated command prompt, type ‘Exit‘ and press enter.