Runas — The “Sudo” Command For Windows
In the world of Unix, the default root terminals are not configured upon purchase. You will learn that the “Sudo” command is the grand administrative command one can use to take full control of your Linux Operating System because it allows you to install, alter, or change any piece of software and grants you root privileges that could further secure your system.
Runas, the equivalent of Sudo in Windows Terminal (PowerShell)
Runas is the Sudo of the Windows Operating system that can allow you to execute programs for other user accounts within your system. You could also use this means of executing programs of any sort on your friends Windows System as a different user or yourself. In order to execute the Runas in the PowerShell, open a Command Prompt window, type Runas with its respective parameters and press Enter.
The syntax for Runas, is as follows:
runas [{/profile|/noprofile}] [/env] [/netonly] [/smartcard] [/showtrustlevels] [/trustlevel] /user:UserAccountName program
In order to run the windows terminal as an administrator simply run the command:
runas /noprofile /user:Administrator cmd
For instance, to start a command shell as administrator, simply run the following command:
runas /noprofile /user:Administrator cmd
Here are the different parameters as specified by Microsoft:
For detailed information and usage, you can visit this article on Microsoft’s TechNet website.
Leave a Response