Displaying Services on a remote computer

Welcome Forums General PowerShell Q&A Displaying Services on a remote computer

This topic contains 2 replies, has 3 voices, and was last updated by

10 months, 2 weeks ago.

  • Author
  • #104075

    Topics: 3
    Replies: 5
    Points: 1
    Rank: Member

    Hello everyone,
    I am trying to run a PowerShell script that displays Windows Services on a Remote Computer using the correct security credentials however, I am being presented with the Error Response below; does anyone know why this is happening?, thank you in advance ...

    PowerShell Code
    $cred = get-Credential -credential domain\user_name
    $computer = "Remote_Hostname"
    Get-WMIObject Win32_Service -computerName $computer -credential $cred

    Error Response
    Get-WMIObject : Call was canceled by the message filter. (Exception from HRESULT: 0x80010002 (RPC_E_CALL_CANCELED))
    At line:3 char:1
    + Get-WMIObject Win32_Service -computerName $computer -credential $cred
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException
    + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

  • #104078

    Topics: 0
    Replies: 669
    Points: 0
    Rank: Member

    This appears to be a WMI issue on the machine to which you're trying to connect

    Try RDPing into the server and making the call locally – if should still fail if its a WMI issue on that server

    then try restarting the WMI service and run get-wmiobject again

    if it still fails try running wbemtest

    if you don't get any success you may have to rebuild the WMI repository

  • #104080

    Topics: 21
    Replies: 592
    Points: 1,149
    Helping Hand
    Rank: Community Hero

    You can try get-ciminstance instead, if wsman works instead of dcom.

The topic ‘Displaying Services on a remote computer’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort