Click here to Skip to main content
Click here to Skip to main content

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

, 14 Mar 2012 CPOL
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

Comments and Discussions

Questioncan't see how this would ever work Pinmemberpmunro15-Mar-12 1:14 
AnswerRe: can't see how this would ever work PinmemberPawel Gielmuda15-Mar-12 1:46 

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

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

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