adamtrask
asked on
Attempting to use PowerShell's Get_Process on a remote computer
Hi,
I am trying to use Get-process on a remoter computer.
Here is what I use:
get-process -computerName 01212A-PC | where-object {$_.WorkingSet -gt 20000}
I get the following error:
Get-Process : couldn't connecto to a remote machine.
At Line:1 char:12
get-process <<<< -computerName 01212A-PC | where-object {$_.WorkingSet -gt 20000}
CategoryInfo : NotSpecified: <:> [Get-Process],[Invalidoper ationExcep tion
FullyQualified ErrorID : System.InvalidOperationExc eption,Mic rosoft.Pow erShell.Co mmands.Get ProcessCom and
Please take into account that I am a novice in all this.
Thank you
I am trying to use Get-process on a remoter computer.
Here is what I use:
get-process -computerName 01212A-PC | where-object {$_.WorkingSet -gt 20000}
I get the following error:
Get-Process : couldn't connecto to a remote machine.
At Line:1 char:12
get-process <<<< -computerName 01212A-PC | where-object {$_.WorkingSet -gt 20000}
CategoryInfo : NotSpecified: <:> [Get-Process],[Invalidoper
FullyQualified ErrorID : System.InvalidOperationExc
Please take into account that I am a novice in all this.
Thank you
I agree with all the above reasons except the first. PowerShell Remoting has no connection to this problem - it uses the WSMan protocol, while the remoting for the Get-Process command uses DCOM. In that vain, the 3rd reason should be clarified as the firewall should allow DCOM traffic.
Why don't you just use tasklist from a command prompt?
You could Batch script this together in about 30 seconds if you just need the process information off of a remote PC.
Or use PSTools and grab the info that way?
You could Batch script this together in about 30 seconds if you just need the process information off of a remote PC.
Or use PSTools and grab the info that way?
ASKER
Rob G
Would you give me an example to show me how to use tasklist to get the above information ?
Thank you
Would you give me an example to show me how to use tasklist to get the above information ?
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you.... this is very useful. Any suggestion for further reading on this?
ASKER
Thank you
Adam,
Really depends on what you need.. feel free to reach out direct if you need something else.. or more info on commands.. Been doing Administration since DOS 6.22 so, it just comes with time i guess..
Really depends on what you need.. feel free to reach out direct if you need something else.. or more info on commands.. Been doing Administration since DOS 6.22 so, it just comes with time i guess..
- Remote powershell not enabled on destination computer (enable running enable-psremoting)
- User has not administrative permissions on remote computer (you can specify a user to run on remote computer with -credential
- Firewall blocks remote powershell (check remote firewall or disable to do a test)
- DNS or other network fault.