When you are working as a consultant at clients and your machine is not on their network and you need to develop in Visual Studio with the credential they provide, it can be quite handy to run your Visual Studio with the Windows credentials they provide.

There are a few ways of doing this, in the post I shall list two different methods and how to achieve this.

Option 1:
Shift + Right-click on the Visual Studio icon and select “Run as a different user”

A pop up will come up for you to insert the Windows Credentials. Fill in the details and click ok, Visual Studio will then open up running as the user you entered.

NB: type the username as domain\username

Option 2:
Step 1:
Open up Run

Step 2:
Type in the following:

runas /netonly /user:domain\username “C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe”

Step 3:
Set the domain and username for the Windows Account details you want to run Visual Studio as. Also make sure that the path specified is correct for your laptop (depends on where you installed Visual Studio)

Step 4:
A CMD prompt will popup asking you to type in the password. You need to type in the password for the Windows Account that you are impersonating.

NB! While you are typing the password in, it will not show that you are typing in anything.

Leave a Reply

Your email address will not be published. Required fields are marked *