How to open an elevated command prompt using a CMD

How do you normally open an elevated command prompt windows. In Windows 10/8/7 you right-click on Command Prompt and select Run as administrator. In Windows 10/8, you use the Win+X menu and select Command Prompt (Admin). But did you know that you can also open an elevated instance of Command Prompt using a normal CMD?

Open elevated command prompt using CMD

Now this is a geek tip! If you need to open an elevated command prompt USING the default ‘regular’ command prompt, you can do so by typing in the following command and hitting Enter:

runas /netonly /user:ack-pc\ack cmd

Replace ack with your admin user name.

cmd admin cmd

That’s all you need to do. You will find that a Command Prompt (Admin) window opens.

Do share if you know of any more such geeky tips!

Download this VPN to secure all your Windows devices and browse anonymously
Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

8 Comments

  1. Vemund Dyrkolbotn

    Even better : Make a file called “sudo.bat” in a path folder containing the following:
    @runas /netonly /user:[computer]\[admin-username] %1 %2 %3 %4 %5 %6 %7 %8 %9

    Replace [computer] with the computer name and [admin-username] with your admin user name. 🙂

  2. Sitaram

    Can any one explain me the user of /netonly switch? In which scenario this is useful?

  3. Rodolfo

    Thank you.

  4. S?la Sitesi

    Btw, you could just use %* to accept all parameters instead of doing it one by one.

  5. Joe Martinez

    “runas” is not recognized as an internal or external command” hmmmmmmm

  6. mahugu

    i want to add an administrator to the system and only have normal rights

  7. Only an admin can add an admin user.

  8. so said microsoft hahaha

Leave a Reply

Your email address will not be published. Required fields are marked *


9 + 3 =