su - Windows command-line utility to allow one to become another user without logging off


su [-] [-c cmd] [-b|-i|-s] [-e] [-v] [-w] [-n]
   [{[[user] [-d domain]] | [domain/user]}]


The su(1w) Windows utility requests the password for user (or for Administrator, if no user is provided), and switches to that user and group identifier (ID) after obtaining the information. It then executes a command.

To use su, the user must have the following permissions:

For information about how to grant these permissions, refer to the Windows operating system documentation.

For the required privileges, the domain-level policy settings override the local policy settings. If the domain-level policies do not allow a local administrator to set the privileges, contact your domain administrator.


The su utility supports the following options:

Loads the user profile.
Accepts the command cmd to carry out in the specified user context. The default is cmd.exe.
Batch logon. The target user needs SeBatchLogonRight.
Interactive logon. The target user needs SeInteractiveLogonRight. This is the default logon type.
Service logon. The target user needs SeServiceLogonRight.
Disables environment preparation (inherit parent environment).
Verbose output to stdout.
Does not wait on child.
Does not create new console.
Allows the user to enter the domain name. The default domain is the local computer.


Possible exit-status values are:

Successful completion