WMI: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) throws when try to connect to remote machine

后端 未结 3 2133
独厮守ぢ
独厮守ぢ 2021-02-07 14:55

I\'m using the following code to connect to remote machine using WMI:

   ConnectionOptions connOptions = new ConnectionOptions();
            connOptions.Imperso         


        
3条回答
  •  被撕碎了的回忆
    2021-02-07 15:26

    Still you have problem then follow below link may help you.

    Connecting to WMI Remotely

    I facing this issue even my all firewall is off.

    Below command run and my problem is solved.

    1. netsh advfirewall firewall set rule group="windows management instrumentation (wmi)" new enable=yes

    2. netsh advfirewall firewall add rule dir=in name="DCOM" program=%systemroot%\system32\svchost.exe service=rpcss action=allow protocol=TCP localport=135

    3. netsh advfirewall firewall add rule dir=in name ="WMI" program=%systemroot%\system32\svchost.exe service=winmgmt action = allow protocol=TCP localport=any

    4. netsh advfirewall firewall add rule dir=in name ="UnsecApp" program=%systemroot%\system32\wbem\unsecapp.exe action=allow

    5. netsh advfirewall firewall add rule dir=out name ="WMI_OUT" program=%systemroot%\system32\svchost.exe service=winmgmt action=allow protocol=TCP localport=any

提交回复
热议问题