runas

Usage

RUNAS [ [/noprofile | /profile] [/env] [/savecred | /netonly] ] /user:UserName program

RUNAS [ [/noprofile | /profile] [/env] [/savecred] ] /smartcard [/user:UserName] program

RUNAS /showtrustlevels

RUNAS /trustlevel:TrustLevel program

Flags

/noprofile       Do not load the user's profile.
                 This causes the application to load more quickly, but
                 can cause some applications to malfunction.
/profile         Load the user's profile. (default)
/env             Use the current environment instead of user's.
/netonly         Use the credentials for remote access only.
/savecred        Use credentials previously saved by the user.
/smartcard       Load the credentials from a smartcard.
/user            UserName in the form USER@DOMAIN or DOMAIN\USER
/trustlevel Level  One of levels enumerated in /showtrustlevels.
                   RunAs is not able to launch an application with an elevated
                   access token.
program          The program to run.

Examples

Run program as AD-user context for network tasks

runas /netonly /user:<DOMAIN>\<USER> program

Also see

N/A