Online Help > Support/Resources > Tips And Tricks > Run as Another User

Built-in RunAs

Description

 

This article describes the built in method of using Run As. For sessions types that don't yet support the built in method you can follow the manual steps outlined here.

 

Settings

 

Supported Types

The following types currently support Run As.

 

OPTION

DESCRIPTION

Session

Command Line

PowerShell

Session Tool

Command Line

PowerShell Local

PowerShell Remote

PSExec

Session Add-on

SQL Server Management Studio

 

Session

 

PowerShell session - Run As tab

 

Sessions that support Run As will have a Run As tab where you specify which credentials to use when starting with Run As.

 

OPTION

DESCRIPTION

Disabled

no Run As is performed

Use session credentials

use the same credentials as defined in the session

Use custom credentials

use specified custom credentials

Use credential repository

use a link credential entry

Use my personal credentials

use a link private credential entry

 

Session Tool

 

With tools session types you only need to specify Run as different user in the Run As tab. At execution time the credentials will be resolved and used to start the Run As process.

 

Command line session - General tab

Command line session - General tab

 

With tools session types you only need to specify Run as different user. At execution time the credentials will be resolved and used to start the Run As process.

 

Session Add-on

 

SQL Server Management Studio is the only Add-on that supports Run As. Configure it like you would configure a normal session.

 

SQL Server Management Studio - settings

SQL Server Management Studio - settings

 

Click on Run as different user to modify the Run As settings.

 

Run As Different User

Run As Different User

Run As - configuration

 

Notes

 

Run as Different User and Run As Administrator are mutually exclusive.

 

Run as Different User doesn't allow for Shell Execute.

 

The NetOnly parameter is not supported in the built-in Run As support. If you must use the NetOnly parameter you must revert to the Manual Run As method.

 

Example: Command line session with Run as different user on the same workgroup/domain

1. Create a new Command Line session.

 

2. Set the command to CMD.

 

Command Line session - General tab

Command Line session - General tab

 

3. Specify the Run As credentials.

 

Command Line session - Run as tab

Command Line session - Run as tab

 

4. Save your session.

 

5. Run your Command Line session.