Click here to Skip to main content
13,192,426 members (47,192 online)
Click here to Skip to main content
Add your own
alternative version


5 bookmarked
Posted 14 Mar 2012

How to Run Programs as a Domain User from a Non-domain Computer

, 14 Mar 2012
Rate this:
Please Sign up or sign in to vote.
This method allows you to run processes as different user


This method allows you to run processes as a different user.


I found this during the setup of virtual machine for Coded UI tests (it isn't part of the domain, and you need to have access to TFS via domain if you need to read data from Test Cases).

Using the code 

On Windows 7, run PowerShell and enter:

runas /netonly /user:domain\username cmd

It will open command line windows running as a domain user.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Pawel Gielmuda
Software Developer ABB
Poland Poland
No Biography provided

You may also be interested in...


Comments and Discussions

Questioncan't see how this would ever work Pin
pmunro15-Mar-12 0:14
memberpmunro15-Mar-12 0:14 
AnswerRe: can't see how this would ever work Pin
Pawel Gielmuda15-Mar-12 0:46
memberPawel Gielmuda15-Mar-12 0:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171017.2 | Last Updated 14 Mar 2012
Article Copyright 2012 by Pawel Gielmuda
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid