Friday, June 26, 2009

Hot to use Run As in Comman Prompt

About runas

Enables a user to execute a program on another computer as yourself or as another user.

syntax

RUNAS [/profile] [/env] [/netonly] /user: program

/profile if the user's profile needs to be loaded
/env to use current environment instead of user's.
/netonly use if the credentials specified are for remote access only.
/user should be in form USER@DOMAIN or DOMAIN\USER
program command line for EXE. See below for examples

Examples:
runas /profile /user:mymachinename\administrator cmd
runas /profile /env /user:mydomain\admin "mmc %windir%\system32\gpedit.msc"
runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""

No comments:

Post a Comment