Monday, July 4, 2011

Run as Commands



C:\>runas /profile /env /user:tomax7\admin "mmc %windir%\system32\dsa.msc"

C:\>runas /profile /env /user:tom8\tom "%windir%\notepad.exe



C:\Documents and Settings\tom>runas /?



RUNAS USAGE:



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



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



/noprofile - specifies that the user's profile should not be loaded.

This causes the application to load more quickly, but can cause some applications to malfunction.



/profile - specifies that the user's profile should be loaded. This is the default.



/env - to use current environment instead of user's.



/netonly - use if the credentials specified are for remote access only.



/savecred - to use credentials previously saved by the user.

This option is not available on Windows XP Home Edition and will be ignored.



/smartcard use if the credentials are to be supplied from a smartcard.



/user should be in form USER@DOMAIN or DOMAIN\USER program command line for EXE.



Examples:

> runas /noprofile /user:mymachine\administrator cmd

> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"

> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""



NOTE: Enter user's password only when prompted.

NOTE: USER@DOMAIN is not compatible with /netonly.

NOTE: /profile is not compatible with /netonly.



C:\Documents and Settings\tom>cd\



C:\>runas /profile /env /user:tomax7\admin "mmc %windir%\system32\dsa.msc"

Enter the password for tomax7\admin:



Attempting to start mmc C:\WINDOWS\system32\dsa.msc as user "tomax7\admin" ..

RUNAS ERROR: Unable to run - mmc C:\WINDOWS\system32\dsa.msc

1326: Logon failure: unknown user name or bad password.



C:\>runas /profile /env /user:tom8\tom "%windir%\notepad.exe

Citrix xen App port Numbers

ICA: 1494 Session reliability: 2598 IMA: 2512 (Server to server) 2513 (Server to console) XML: 80 when integrated with IIS can be configu...