How to open Powershell with administrative privileges from CMD

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.

Picture 1 of How to open Powershell with administrative privileges from CMD

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.

ncG1vNJzZmismaXArq3KnmWcp51ktbDDjK2mZqegmrtuvM6wnKurmJq5rXnWoquhZZGZuqq6yKyrq5mknsOmec%2BroK%2BhnJq0pr%2BMn6mopV2YuqU%3D