Announcement

Collapse
No announcement yet.

Get remote system process owner

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Get remote system process owner

    Hello:

    I am trying to the owner for a particular process on a remote computer. This is what I have come up with:

    (Get-WmiObject -class win32_process -computer RemoteComputerName | where{$_.ProcessName -eq 'winword.exe'}).getowner() | select user

    What gets returned is

    user
    ----

    I know for a fact that someone is running that process on the remote machine. If I run the same command on the remote machine locally I get the correct user's name reported back. If I only run:

    (Get-WmiObject -class win32_process -computer RemoteComputerName | where{$_.ProcessName -eq 'winword.exe'}).getowner()


    What I get back is:

    __GENUS : 2
    __CLASS : __PARAMETERS
    __SUPERCLASS :
    __DYNASTY : __PARAMETERS
    __RELPATH :
    __PROPERTY_COUNT : 3
    __DERIVATION : {}
    __SERVER :
    __NAMESPACE :
    __PATH :
    Domain :
    ReturnValue : 2
    User :

    It does not seem to matter what process I run that query for and for what computer, the user and domain part are just never returned. I've trie turning on the 'Windows Remote Management' service on the remote computers but still nothing happens. What am I missing?
Working...
X