Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I use the command runas and run a program as a different user on the domain will this actually return information regarding their computer or will it give me my comptuers information?

for example if I use

Runas (other user on domain) -tasklist.exe

Will this return their tasklist information?

share|improve this question

migrated from stackoverflow.com May 18 '11 at 14:48

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

up vote 3 down vote accepted

No, this will just run the program locally on your machine with their credentials. I think SysInternals has a program that can execute commands on remote machines - I believe it's called PsExec.

share|improve this answer
    
I have heard of PsExec (but I need to download the toolset), the problem is I need to be able to execute a program on remote machines without downloading/using anything else. –  harper89 May 18 '11 at 12:39
add comment

From Powershell you could issue the following command

Example

Get-WmiObject -class win32_process | foreach { write-host $_.ProcessName -NoNewline ; Write-Host  $($_.getowner() | select domain, user) }

Sample Output

conhost.exe@{domain=LandLocked; user=userA}
iexplore.exe@{domain=LandLocked; user=userB}
iexplore.exe@{domain=LandLocked; user=userB}
chrome.exe@{domain=LandLocked; user=userA}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.