Windows 10 and 11 logos

PowerShell and Command Prompt (CMD) have a lot of overlapping functionality, but what if you specifically need to open PowerShell from Command Prompt or a batch file? Here’s how you do it.

How to Open PowerShell From Administrator CMD

When you run any application from an elevated Command Prompt, that application also starts with administrative privileges. The same applies to batch files — if the script was run as administrator, then any applications started by the script will also be run as administrator. Type powershellinto Command Prompt to start PowerShell with admin privileges.

Note: On Windows 10, running powershell in Command Prompt will open a new PowerShell window. If you’re using Windows 11, it’ll behave a bit differently. Command Prompt launches in Windows Terminal, and when you run PowerShell from Command Prompt, it just runs it within 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 pretty roundabout way of doing things. You actually need to invoke PowerShell from Command Prompt to launch a different PowerShell window.

To do so, type or paste powershell start-process powershell -verb runas into Command Prompt, and then hit Enter. A new elevated PowerShell window will appear.

As always, be careful doing things in an elevated PowerShell environment. You may want to read more about some of the advanced features PowerShell has to offer.

Profile Photo for Nick Lewis Nick Lewis
Nick Lewis is a staff writer for How-To Geek. He has been using computers for 20 years --- tinkering with everything from the UI to the Windows registry to device firmware. Before How-To Geek, he used Python and C++ as a freelance programmer. In college, Nick made extensive use of Fortran while pursuing a physics degree.
Read Full Bio »