How to open Powershell with administrative privileges from CMD
When you run any application from Command Prompt with elevated privileges for Admin, that application will also be started with administrative privileges.
PowerShell and Command Prompt (CMD) possess a lot of overlapping functions, 'stepping in' each other. But what if you specifically need to open PowerShell from the Command Prompt or a batch file? Find out how to do it right here.
How to open PowerShell from administrator CMD
When you run any application from Command Prompt with elevated privileges for Admin, that application will also be launched with administrative privileges. The same applies to batch files - if the script is run as administrator, any applications started by the script will also be run as administrator. At this point, just type the powershell command into the Command Prompt to launch PowerShell with administrator privileges.
(Note: On Windows 10, running the powershell command in Command Prompt will open a new PowerShell window. If you're using Windows 11, the command will work a little differently. Command Prompt launches in Windows Terminal and when If you run PowerShell from the Command Prompt, it will open in the same window.
How to open PowerShell from any CMD
Starting PowerShell with administrative privileges from a regular, non-elevated Command Prompt window is a rather 'clumsy' way to do it. Basically, you'll need to 'wake up' PowerShell from the Command Prompt to launch another PowerShell window.
To do so, type or paste the command powershell start-process powershell -verb runas into the Command Prompt, and then press Enter. A new elevated PowerShell window (with administrative privileges) will appear.
Be careful when performing any task in an enhanced PowerShell environment. Any mistake can cause your system problems.
You've just finished reading the article "How to open Powershell with administrative privileges from CMD" edited by the TipsMake team. You can save how-to-open-powershell-with-administrative-privileges-from-cmd.pdf to your computer here to read later or print it out. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.
- 5 ways to run File Explorer with administrator privileges on Windows 11
- Run CMD with administrator privileges on Windows 7, 8, 8.1, and 10.
- How to run File Explorer with administrative rights in Windows 11
- Use PowerShell to download any file on Windows 10
- About PowerShell
- How to Reset Windows 7 Administrator Password