Using runas to perform administrative tasks
Posted: (EET/GMT+2)
If you need to perform administrative tasks without logging off and back on as another user, Windows includes the runas command.
This useful command starts a program using different user credentials. For example, to open a command prompt as a domain administrator:
runas /user:DOMAIN\Admin cmd
Windows prompts for the password and starts a new command shell using the specified account. You can also launch administrative tools in the same way. For instance:
runas /user:DOMAIN\Admin mmc runas /user:DOMAIN\Admin compmgmt.msc runas /user:DOMAIN\Admin dsa.msc
This is useful when your day-to-day account does not have administrative privileges. The command works too, if some of your servers are not domain joined. In this case, use the command like this:
runas /user:SERVER01\Administrator cmd
This is great for Active Directory administration, server management, and troubleshooting tasks, for example.