以编程方式编辑DCOM协议

时间:2018-03-13 15:05:27

标签: windows powershell windows-server dcom

我需要通过powershell自动化操作,但我只是不知道如何操作。

以下是手动程序:

  1. 点击“组件服务”:
  2. Click on "Component Services"

    1. 点击计算机的“属性”
    2. Click on "Property" of the computer

      1. 点击“TCP / IP连接”的“属性”
      2. Click on "Property" of the "TCP/IP connexion"

        1. 添加端口范围
        2. Add a port range

          1. 输入端口范围,然后点击“确定”
          2. Enter a port range, then hit "OK"

            我在线搜索了很长一段时间,并获得了一些关于如何访问相关WMI对象的线索,但是从那里开始,我被卡住了。我用反复试验无济于事。

            如果有人这样做过,或者对此有更多了解,我会很高兴知道它。

1 个答案:

答案 0 :(得分:0)

注册表项:HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Rpc \ Internet
ValueName:端口
类型:REG_MULTI_SZ

从Windows Server 2016的Regedit.exe中导出密钥的示例,用于端口:60001-61248:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Rpc\Internet]
"PortsInternetAvailable"="N"
"UseInternetPorts"="N"
"Ports"=hex(7):36,00,30,00,30,00,30,00,31,00,2d,00,36,00,31,00,32,00,34,00,38,\
  00,00,00,00,00,00,00

更详细描述这些设置的链接是: How to configure RPC dynamic port allocation to work with firewalls

我最初在此网页上找到此注册表项的提示:Troubleshooting RPC Endpoint Mapper errors using the Windows Server 2003 Support Tools from the product CD

相关问题