Posted: . At: 10:01 AM. This was 9 years ago. Post ID: 8088
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

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.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.