Get remote process user without administrator permission.

Hello,
I would like to use a script to query the processes on the server, based on the process id and returns the user name. I tried following four methods and they all only work with administrator permission.  Without admin permission, they will not return the user name. May I ask if any method to return the user name, without server admin permission? Thanks so much in advance!

get-process -id 12856 | select-object id,name,@{n='Owner';e={$owner}}

Get-Process -Id 12856 -IncludeUserName | Select-Object -Property UserName

tasklist.exe /v /fi "PID eq 12856"

QUERY PROCESS 12856
Vivian_ShiAsked:
Who is Participating?
 
rastoiWindows DTS expertCommented:
due to obvious security reason is non-admin user able to see only own and some of system processes.
So - answer to your question is no.
I hope you are aware that PID is not constant and will be probably different on another run of the same process.
2
 
Vijaya KumarCommented:
Start-Process powershell -Verb runAs

then put your commands

Get-Process -Id 12856 -IncludeUserName | Select-Object -Property UserName
get-process -id 10268 | select-object id,name,@{n='Owner';e={$owner}}
0
 
Vivian_ShiAuthor Commented:
Thanks a lot for your insights!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.