I just wanted to give a quick heads up to admins using Windows 8 or planning to migrate users to W 8.x and then assist them as a support help. Things changes and the old days of Windows XP are gone…. Oh well. Let's move on. Before, there was a simple way in Windows 7 to launch command prompt window as an admin – with a right click on an icon which were in the “Accessories” folder within the start menu. Clean, understandable and I'd say normal. Things have changed in Windows 8.1 as there is no icon in start menu. (He he, oh well there is no start menu). So how to get around that and Open Command Prompt With Admin Privileges ?
I've started to use W 8.1 as probably many of you, after all, and in Windows 7 I have had a habit to open command prompt with a shortcut Windows Key + R where I type “CMD”. In W7 when logged as a domain admin this would normally opens a command prompt with admin privileges. However in W 8.1 if you logged as an domain admin, this opens a command prompt without admin privileges, so not good.
I'll show 3 ways to Open Command Prompt with Admin Privileges in Windows 8.x
01. First Option
Hit Windows Key + X
Simple and easy. This brings a menu which has the option to open command prompt with admin privileges. Cool, anything else? Yes there are other ways to do it. Read on.
02. Second Option
If you don't have any alternative start menu installed, the when you hit the start icon it brings the start screen with the tiles. You can type in the search panel there. Just type “command prompt” and it will bring the icons you need. There you can simply right click and chose Run as administrator.
03. Third option
The third way is to simply right click the start button, which brings the menu we have opened in the First option! But that's too easy as an option, isn't it… I have another option while here. You can open simple norma (not admin) command prompt, and then type a command to open a privileged command prompt from there!
You simply type this:
runas /user:mymachineadministrator cmd
This brings another window, this time with admin priviledges…
In my example, my Workstation's netbios name is SBOOK2, so I just typed:
runas /user:SBOOK2administrator cmd
You are prompted to enter the password for the local administrator account. (Note that you can reset this password via local management console (shortcut is compmgmt.msc ), if of course you are logged in with an account with sufficent priviledges.
I hope it helps to get you started. Enjoy…-:)
Terry Wrennall says
The last (runas) version dosnt work for me (Win 2008 R2, Win 8.1, Win 2012 R2 and Win 2012)
and checking the trust level (runas /showtrustlevels) only shows basic (0x20000 (Basic User)) on all those
Are you sure there is not another setting you need to add or have changed?
Vladan SEGET says
Hi Terry,
Thanks for the comment. The last option shows how to run the elevated command prompt as a local admin of the system. You can do the same, if for example you’re logged in as a regular domain user (without administrtor’s priviledges) and want to elevate your priviledges as “domain admin” with “runas user:your_domain\administrator cmd”.
Good explanations and options can be found on Technet: http://technet.microsoft.com/en-us/library/bb490994.aspx
As concerning the “showtrustlevels” options I haven’t found much on the above link.
Terry Wrennall says
I understand how to do a runas, I’m just saying that doing a, runas /user:xxx\yyy cmd, didn’t automatically run elevated (as an account with admin rights) in my testing on the operating systems I previously mentioned
I was wondering if you’d set something else that was allowing that to happen (disabled UAC or GPO or similar)
Vladan SEGET says
I’d say that there is a difference to achieve things. Interactively (runas) OR permanent across reboots (GPO, UAC). But basically both do the same things. (Or it shall do the same things). If your result shows that the interactive command did not elevated your precised user for particular command….. Reading technet, they even evoke running this not for an admin, but more priviledged than average user, well. It’s just feels strange that it did not worked for you.
Bert says
the third one is not the same, it is just a command prompt with the administrators account, NOT with administrator privileges. As stated here http://msdn.microsoft.com/en-us/library/bb756922.aspx “runas” can’t be used to run a command line with elevated privileges .
Steve says
Another option is downloading psexec and extracting it to the Windows\System32 folder.
To run an elevated command prompt, type > psexec -h cmd.exe