How can I run Active Directory management tools as another user (one with administrative privileges)?
As a security best practice, it is recommended that you do not log on to your computer with administrative credentials. Running your computer as a member of the Administrators group makes the system vulnerable to Trojan horses attacks and other security risks.
It is recommended that you use a regular, non-administrative user account to perform routine tasks, including running programs and visiting Internet sites. When it becomes necessary to perform administrative tasks on the local computer or in Active Directory, use RUNAS to start a program using administrative credentials.
RUNAS allows you to accomplish administrative tasks without exposing your computer or data stored in Active Directory to unnecessary risk.
However, using the RUNAS command can turn out as a real bugger when you need to perform regular administrative operations such as adding a new user, resetting someone’s password, stopping or starting a system service and so on.
In Windows 2000 we welcomed the new addition – the RUNAS command. However, in Windows Server 2003 the RUNAS command got even easier to use.
Therefore I recommend using the following method to make your administrative tasks a bit easier to accomplish:
runas /savecred /user:dpetri'administrator "mmc dsa.msc"
Note: The /savecred parameter indicates if credentials have been previously used by this user then the command will not prompt for them a second time. This parameter does NOT work on Windows 2000.
Lamer Note: Use your own domain name and user name… Duh…
Other valuable RUNAS example might include any .MSC snap-in you want to run. You can easily find them by performing a search on the %systemroot% folder for files that have the .MSC extension. For example:
runas /savecred /user:dpetri'administrator "mmc domain.msc" runas /savecred /user:dpetri'administrator "mmc dssite.msc" runas /savecred /user:dpetri'administrator "mmc dsa.msc" runas /savecred /user:dpetri'administrator "mmc compmgmt.msc" runas /savecred /user:dpetri'administrator "mmc gpmc.msc" runas /savecred /user:dpetri'administrator "mmc services.msc"
You may find these related articles of interest to you: