Get-WMIObject RPC Server is Unavailable

Welcome Forums General PowerShell Q&A Get-WMIObject RPC Server is Unavailable

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

 
Participant
4 years, 7 months ago.

  • Author
    Posts
  • #14551

    Participant
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

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

The topic ‘Get-WMIObject RPC Server is Unavailable’ is closed to new replies.