This write-up will discuss various approaches to run PowerShell as an administrator.
How to Run PowerShell as Administrator?
The PowerShell can be launched in admin mode using the following methods:
Method 1: Execute PowerShell From Start Menu as an Administrator
First an easy method to execute PowerShell as an admin via the “Start menu”:
- First, move to the “Start menu”.
- Type and search “PowerShell”.
- After that click on “Run as Administrator”:
Method 2: Run PowerShell as an Administrator From Run Box
One more method to launch “PowerShell” with administrative privileges is from the “Run” dialog box. For that reason:
- First, press the “Windows+E” shortcut key to launch “Run”.
- After that type “PowerShell” and press “CTRL+Shift+Enter” altogether to execute PowerShell with administrative privileges:
Method 3: Execute PowerShell as an Administrator From PowerShell Console
PowerShell can be launched in admin mode from a normal PowerShell console by executing the below command:
According to the above code:
- “Start-Process” starts one or more processes as an independent user.
- “-verb runAs” is utilized to launch PowerShell in admin mode:
Method 4: Run PowerShell as an Administrator From Windows Explorer
Another method to launch PowerShell as an administrator is through “Windows Explorer”. For the corresponding purpose, check out the provided instructions.
Step 1: Open “This PC”
Firstly, move to the “Start menu”, search and open “This PC”:
Step 2: Navigate to the “File” Option
Trigger the “File” option:
Step 3: Launch PowerShell
After that, hover over “Open Windows PowerShell” and click on “Open Windows PowerShell as administrator”:
As it can be observed that the PowerShell has been launched successfully.
Conclusion
By default, PowerShell is launched in normal mode. However, you can run it as an administrator using several methods. These methods include “Start menu”, “Run dialog box”, “PowerShell console”, or “Windows explorer”. This blog has provided a detailed guide to execute PowerShell with administrative privileges.