Get Remote Process + user Id and commandline

I recently had to generate a script to find out what process and pid something was on a remote machine I came up with this small powershell function to do just that:


function Get-RemoteProcessUser

$process = (Get-WmiObject -ComputerName $Computername -ClassName win32_process -filter "name like '%$Processname%'" | Select-Object Name,@{n='Owner';e={$_.GetOwner().User}}, commandline, creationdate, Processid) | Where-Object{$_.owner -eq $username})


Short but effective .


Keep on Scripting


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s