Changing the Server's Name/IP/Port Details in Agent
Problem
Agents not communicating with the server after migration.
Cause
The new server details like FQDN, IP, Port numbers are not available with the agent.
Resolution
Changing the following details in the Agents:
- The Name or the IP Address of the Server
- The HTTP and HTTPS ports that are used by the Agents to communicate with the Server
- The mode of the communication as HTTP or HTTPS
These values can be changed either by using GPO (For Windows) or by executing a script (For Linux, Mac and Windows).
GPO can only be used in a Windows environment, the values can be changed by following the steps given below:
Steps:
- To get the updated server details, go to the Patch Manager Plus console, navigate to Reports-->Query Reports-->New Query Report and execute the following query:
SELECT
SERVER_MAC_NAME,SERVER_MAC_IPADDR,SERVER_FQDN,SERVER_PORT,HTTPS_PORT FROM DCServerInfo

- The report will have the following details:
<Server Name> <Server IP Address> <Server HTTP port> <Server HTTPS Port>
Copy the details and have it saved.

- Also make a note of the mode of communication (HTTP or HTTPS) from: Admin-->Security Settings
- Copy the configureUEMSAgentServerCommunication.txt file, save it as configureUEMSAgentServerCommunication.vbs.
- Download GPO_AgentServerComm.txt, rename it as GPO_AgentServerComm.ps1 and save it in the same location where configUEMSAgentServerCommunication.vbs is saved.
- Run Windows PowerShell in administrative mode and navigate to the location where the script is present and execute the script GPO_AgentServerComm.ps1 with arguments as mentioned below:
GPO_AgentServerComm.ps1 configUEMSAgentServerCommunication.vbs
<ServerName> <Server IP Address> <Server HTTP port> <Server HTTPS Port> <ServerAgent Comm Protocol>
Example:
GPO_AgentServerComm.ps1 configUEMSAgentServerCommunication.vbs
DC-COMP.DC.COM 192.192.192.192 8020 8383 https
- In the Power shell window, Enter the name of the GPO to be created and press Enter.
- Now, enter the Distinguished Name of the OU or Domain to which the policy is being linked.
- Follow the steps mentioned below to get the Distinguished name:
- Open Active directory users and computers in Administrative tools.
- Right click on the OU / Domain that needs tobe linked.
- Select Properties-->Attribute Editor-->distinguishedName-->View.
- Copy and paste the value of distinguishedName in the PowerShell window and hit Enter

- If you want to 'Add' another Domain, press y and add the required domain. Press n once all the required domains have been added. This will automatically initiate the application of the GPO.
To change the values using a script for Mac, Linux and Windows machines follow the steps given below:
Steps:
- For Windows - Download the configureUEMSAgentServerCommunication.txt and rename it to configureUEMSAgentServerCommunication.vbs.
For Mac - Download the configureUEMSAgentServerCommunication_mac.txt and rename it to configureUEMSAgentServerCommunication.sh.
For Linux - Download the configureUEMSAgentServerCommunication-linux.txt and rename it to configureUEMSAgentServerCommunication.sh.
- Copy the script to the client computers where the agent is installed.
- Open a command prompt/terminal.
-
To execute the script for Mac & Linux agents, add executable permission by running the command 'chmod +x configureUEMSAgentServerCommunication.sh'
- Execute the command given below:
For Windows - cscript configureUEMSAgentServerCommunication.vbs <ServerName> <Server IP Address> <Server HTTP Port> <Server HTTPS Port> <ServerAgent Comm Protocol>
Example: cscript configureUEMSAgentServerCommunication.vbs joe.manageengine.com 192.168.112.146 8020 8383 http
For Mac - sudo ./configureUEMSAgentServerCommunication.sh <ServerName> <Server IP Address> <Server HTTP Port> <Server HTTPS Port> <ServerAgent Comm Protocol>
Example: sudo ./configureUEMSAgentServerCommunication.sh joe.manageengine.com 192.168.112.146 8020 8383 http
For Linux - sudo ./configureUEMSAgentServerCommunication.sh <server_name> <server_ip> <http_port> <'http'/'https'>
Example - sudo ./configureUEMSAgentServerCommunication.sh joe.manageengine.com 192.168.112.146 8020 http