Network Management

Configure a Windows Server to use a fixed TCP port for WMI communications over the network

This article demonstrates how to configure a Windows Server to use a fixed TCP port for WMI-related communications.

First published date

11/2/2018 9:05 PM

Last published date

3/17/2020 2:50 PM

Overview

WMI runs as part of a shared service host with ports assigned through DCOM by default. However, you can set up the WMI service to run as the only process in a separate host and specify a fixed port.

The following procedure is an automated setup to allow WMI to have a fixed port. The procedure uses the winmgmt(© 2019 Microsoft, available at https://docs.microsoft.com/, obtained on December 3, 2019) command-line tool.

Product section

Network Performance Monitor

Resolution

  1. In the command prompt, type winmgmt -standalonehost
  2. Stop the WMI service by typing the command net stop "Windows Management Instrumentation" or use the short name of net stop winmgmt.
  3. Restart the WMI service in a new service host by typing net start "Windows Management Instrumentation" or net start winmgmt.
  4. Establish a new port number for the WMI service by typing netsh firewall add portopening TCP 24158 WMIFixedPort.

For more information about this tweak, you may visit Microsoft's WMI documentation(© 2019 Microsoft, available at https://docs.microsoft.com/, obtained on December 3, 2019).

Additionally, Thwack! user aLTeReGo has a blog post that discusses about securing WMI using different methods (© 2003-2019 SolarWinds, available at https://thwack.solarwinds.com/, obtained on December 3, 2019).

Please note that Thwack is a community space where users may post any content as a suggestion or recommendations to you for your internal use. The information set forth herein may come from third-party websites or customers. SolarWinds is not liable for any downtime or any issue that may occur if you perform the following suggestions on the link provided. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment.