Running admin commands on a workstation

by Mitch Tulloch [Published on 23 Nov. 2005 / Last Updated on 23 Nov. 2005]

How to run admin commands on a workstation when you are logged on as a non-admin.

As best practice recommends, I have two user accounts for my administrator workstation: the local Administrator account for when I want to perform admin tasks, and an ordinary user account (member of Domain Users) for activities like checking email, writing reports, browsing the web and so on.When I'm logged on as ordinary user and want to perform some quick admin task, I usually open a command prompt with domain admin credentials and then run the admin tool I need by typing it into the command window. Here's how I do it:

Create a new shortcut and type the following as the command path:

runas /u:DOMAIN\administrator cmd.exe

where DOMAIN is the name of your domain. Name the shortcut something like "run cmd as domadmin" and drag it onto your Quick Launch toolbar so it's easy to access.

Now click the shortcut when you want to run some admin tool like Event Viewer to view the event logs on your remote domain controller. This opens a command window prompting you for the password for the domain Administrator account. Type the password and press ENTER and the first command window will disappear and a new one will open. This new command window is running under domain admin credentials, so now to view the event logs on your remote domain controller type:

eventvwr.msc /computer=DCNAME

where DCNAME is the name of your remote domain controller.

The Author — Mitch Tulloch

Mitch Tulloch is a widely recognized expert on Windows administration, networking, and security. He has been repeatedly awarded Most Valuable Professional (MVP) status by Microsoft for his outstanding contributions in supporting users who deploy and use Microsoft platforms, products and solutions. Mitch has published over two hundred articles on different IT websites and magazines, and he has written or contributed to almost two dozen books and is lead author for the Windows 7 Resource Kit from Microsoft Press. For more information, see .

Latest Contributions

Featured Links