This project has moved. For the latest updates, please go here.

Get-WmiObject : The remote procedure call failed and did not execute.

Jan 12 at 7:16 PM
I have firewall between two sharepoint server. When i try running this script it fails at stopping service on another server . I get the below error.

Get-WmiObject : The remote procedure call failed and did not execute.
(Exception from HRESULT: 0x800706BF)
At D:\Scripts\SPCacheCleaner.ps1:57 char:12
  • $service = Get-WmiObject -ComputerName $serverName Win32_Service -Filter
    "Name=' ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
    • CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMExcept
      ion
    • FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands
      .GetWmiObjectCommand
This use to work before but stopped suddenly

Any idea which port may be blocked for firewall