Command Prompt: Run as other user?

3

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?

sealz

Posted 2011-05-18T12:35:17.810

Reputation: 2 034

Answers

3

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.

Terence Lewis

Posted 2011-05-18T12:35:17.810

Reputation:

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. – None – 2011-05-18T12:39:02.843

0

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}

Ro Yo Mi

Posted 2011-05-18T12:35:17.810

Reputation: 347