Windows

Change WinRM Listener Port

In this article will discuss about change winrm listener port in windows operating system.

Windows Remote Management (WinRM) you read official Microsoft document.

Windows Management Instrumentation can be remotely accessed or used locally via scripts.

Windows Management Instrumentation instructions will be provided in two ways.

  • Windows Remote Management (Remote Management)
  • Distributed Component Object Model (older technology)

Windows Remote Management can be enabled using:

  1. Windows PowerShell.
  2. Server Manager.
  3. Windows Remote Shell (WinRS).

WinRM listener runs as a service on computers that is waiting for connections to attempt to be established.

Winrm listener port can listen on two different ways:

  • Hypertext Transfer Protocol (HTTP) or
  • Hypertext Transfer Protocol Secure (HTTPS).

In fact, the WinRM HTTP port is 5985 and for HTTPS is 5986 by default.

It is recommended to stick with the default listening ports for compatibility and ease of use.

Below is windows server 2019 domain controller called apj.com and server name WIN20.

Open Windows PowerShell admin and check currently listener port .

Open Windows PowerShell admin and check currently listener port .
             Check winrm service and Port.

 

Change WinRM Listener Port

Let’s change WinRM listener port for HTTP from 5985 to 9123.

 

change winrm listener port
                  Port number has changed to 9123

 

Create a Firewall rule to allow WinRM traffic:

Open run menu and type wf.msc .

Click on Inbound Rules and select New Rule.

change winrm listener port
             select Port option.

 

select Port and specific the port number as 9123 and protocol will be TCP.

provide port number and click Next
provide port number and click Next.

 

Allow the traffic to pass through firewall, so select allow the connection.

Select Allow option
Select Allow option.

 

Select Profile, which is required as per requirement selected Domain.

Domain Level
                                                       Domain level

 

Give the custom rule name something like Allow WinRM for Custom Port.

Rule name
                                             Rule name

 

 

New custom rule has been created you can see below image.

New custom rule
                                              Rule had been created.

 

Verify the connection in domain member server using the newly created custom WinRM listener port.

Login into domain member server called win21.apj.com

Open windows PowerShell run as administrator and mention the Computer Name of domain controller (Win20.apj.com).

you can see it was failed to establish the connection on default port 5985.Since we changed the port, need to specify the custom port number using -port switch.

 

Mention custom port number.
                                  Mention custom port number.

Now we can see the connection to domain controller server is created successfully using custom port 9123.

 

conclusion:

you can see the session between domain controller and domain member server on custom port number 9123.

For migration of domain controller from one version to another version will get good overview.

Please let me know if you have any questions about change winrm listener port.

 

Next PostNSX-T Data Center Installation Previous PostReset forgotten VMware ESXi 6.5 root password

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *