Get-WMIObject RPC Server is Unavailable

This topic contains 4 replies, has 2 voices, and was last updated by Profile photo of Richard Siddaway Richard Siddaway 3 years ago.

  • Author
    Posts
  • #14551
    Profile photo of Sunil Padmanabhan
    Sunil Padmanabhan
    Participant

    I am running the below command from my Windows 2008R2 Server

    $ComputerName=Get-ADComputer -Filter *|SELECT -ExpandProperty name
    Get-WmiObject win32_OperatingSystem -ComputerName $ComputerName -ErrorAction SilentlyContinue -ErrorVariable $MyErrors| select PSComputerName,Caption,SerialNumber

    The results only fetch me details from Windows Server Machines and Windows XP Machines. I do not get any output from my Windows 7 Machines although the WinRM Service is running on them. But strangely from over 100+ Windows 7 Machines in the network I get 2 Windows 7 Machines listed. All of the Windows 7 Machines except two fetch the RPC Server is unavailable error

    What could be the starting point in trying to resolve this problem?

  • #14552
    Profile photo of Sunil Padmanabhan
    Sunil Padmanabhan
    Participant

    Attached is an extract of services running on 3 Windows 7 Professional PC's
    Machine 1 and Machine 2 get listed when using above command; but Machine 3 does not get listed

  • #14554
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    The RPC Server unavailable message is nothing to do with the WinRM service. Get-WmiObject uses DCOM to communicate with remote machines NOT WSMan (WinRM)

    The message means that either the DCOM service isn't running on the Windows 7 machines or that a firewall is configured that is preventing WMI/DCOM access. Check that DCOM is available and that any local firewalls aren't causing the problem

  • #14590
    Profile photo of Sunil Padmanabhan
    Sunil Padmanabhan
    Participant

    DCOM was running on the machines. But it was the Firewall creating the issue. I have created an exception for the specified Port and now everything is ok.
    Thanks for putting me in the right direction

  • #14595
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    The firewall issues with DCOM is one reason that I'm moving to the CIM cmdlets wherever possible

You must be logged in to reply to this topic.