I need to use WMI for getting some information from my servers. But I have a server in DMZ, so I need to open a port in my firewall. I've searching and I found that WMI uses random port. How can this be fixed?
The following procedure is an automated setup to allow WMI to have a fixed port. The procedure uses the winmgmt command-line tool. To set up a fixed port for WMI
There is more information in other comments
To be able to collect information from remote host via WMI, you need to do the following:
1. Enable remote WMI requests
1.1. On the target server, go to
1.3. Right click for Properties on
1.4. Select the Security tab.
1.5. Press the Security button.
1.6. Add the monitoring user (if needed), and then be sure to check Remote Enable check-box for the user/group that will be requesting WMI data.
2. Allow WMI through Windows Firewall
This can only be done at the command prompt. Run the following on the target computer if it is running a Windows firewall:
on Windows Server 2003 machines
on Windows Server 2008 machines