How to use the runas command in Windows to elevate privileges.

Posted: March 12, 2015. At: 10:01 AM. This was 3 years ago. Post ID: 8088
Page permalink: http://securitronlinux.com/bejiitaswrath/how-to-use-the-runas-command-in-windows-to-elevate-privileges/

The runas command in Windows allows a user to elevate their level of privileges to run a command as the Administrator user. The example below shows the usage of the runas command to open another cmd window as the Administrator user.

C:\Users\mike\Documents\openvpn>runas /user:Scott\Dobbo cmd
Enter the password for Scott\Dobbo:
Attempting to start cmd as user "Scott\Dobbo" ...

The /user parameter specifies the username you are using to elevate your user. Then a : and the computername\Username. This is a convenient way to elevate privileges. I just wish Windows had a command that is easy to remember as sudo or su. Maybe Powershell has an easy to use alternative. But this does work. You will need to type the actual username of the Administrator user and not administrator as that does not seem to work for me.

No comments have been made. Use this form to start the conversation :)

Leave a Reply