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

后端 未结 3 2131
独厮守ぢ
独厮守ぢ 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:06

    Also, You need to enable Windows Management Instrumentation (WMI) rule in windows firewall.

    1] Windows Firewall.
    2] Allow app or feature through windows firewall.
    3] Enable Privilege for Windows Management Instrumentation(WMI).

    To enable or disable WMI rule using Windows firewall

    1. In the Control Panel, click Security and then click Windows Firewall.
    2. Click Change Settings and then click the Exceptions tab.
    3. In the Exceptions window, select the check box for Windows Management Instrumentation (WMI) to enable WMI traffic through the firewall.

    To disable WMI traffic, clear the check box.

    You can also enable or disable WMI traffic through the firewall at the command prompt.

    To enable or disable WMI traffic at command prompt using WMI rule group

    Use the following commands at a command prompt. Type the following to enable WMI traffic through the firewall.

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

    Type the following command to disable WMI traffic through the firewall.

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

提交回复
热议问题