Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Get process ID from a remote computer

Get process ID from a remote computer

Get process ID from a remote computer

I have never used PS.
I'm trying to get PS script to get processes running on a remote computer.
Microsoft documents have this example "Get-Process -Name PowerShell -ComputerName localhost, Server01, Server02"
But like everything at Microsoft, it is confusing and not clear.
I tried this:

CODE --> shell

Get-Process powershell -ComputerName someone-desk2
 Get-Process powershell -someone-desk2
 Get-Process powershell -ComputerName localhost,someone-desk2 
Nothing is working...
Thank you

RE: Get process ID from a remote computer

Do you get any response from

Get-Process powershell

Powershell would normally give you an error if it is not working. What is the error?

RE: Get process ID from a remote computer

Here is the error:

CODE --> shell

Get-Process : Couldn't connect to remote machine.
At line:1 char:2
+  Get-Process powershell -ComputerName desk2
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-Process], InvalidOperationException 
I can ping the "desk-2" and can remotely log in to it...

RE: Get process ID from a remote computer

I really do not know anything about the PS, I found this code on the Microsoft website.
Just FYI, the target PC is running W10 Enterprise

RE: Get process ID from a remote computer

You haven't mentioned what versions of Windows and PowerShell you are using. Get-Process in the default versions of PowerShell in Windows 7, 8.x and 10/11 doesn't have remote capability on its own. You need to use PowerShell Remoting (set up on the destination devices) and use Invoke-Command from the source device. (The Microsoft docs probably refer to PowerShell 7.)

Have a look at the following article - How to Find Running Processes with PowerShell’s Get-Process Cmdlet - particularly the Finding Processes on Remote Computers section. The article includes a link about setting up PowerShell Remoting. It's what I used... :)

Hope this helps...

RE: Get process ID from a remote computer

Thank you!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close