- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
What is a ServiceNow Mid Server
As ServiceNow is a cloud-based platform, a direct connection between the ServiceNow instance and our internal IT infrastructure is not available i.e. our local IT infrastructure will not be visible or accessible to the ServiceNow instance until we bridge this connectivity gap with a secure channel.
The ServiceNow MID (Management, Instrumentation, and Discovery) Server is designed to bridge this gap. Acting as a secure communication gateway, the MID Server facilitates seamless integration, data collection, and remote process execution across various systems, applications, and devices located within an organization's private network.
This lightweight, Java-based application plays a pivotal role in enabling key ServiceNow capabilities, such as Discovery, Orchestration, and IntegrationHub. It ensures real-time communication while maintaining data security by operating behind an organization's firewall.
ServiceNow Mid Server System Requirements
A Mid Server could either be installed on a Windows or Unix based host. For this blog, we will consider installation and configuration of a Windows based Mid Server only. Following are the high-level system requirements for installing and running a Windows based Mid Server:
- A quad core processor with a speed of 2+ GHz for a Windows Server 2012 R2 host.
- Minimum PowerShell version 3.0 available on the host.
- Either of these Windows based 64-bit Operating System:
- Windows Server 2012
- Windows Server 2016
- Windows Server 2019
- Windows Server 2022
For more information, you can refer the official documentation page on ServiceNow Mid Server System Requirements
How to Install the ServiceNow Mid Server
To install ServiceNow Mid Server, we need to follow a sequence of steps which involves creating a Mid Server User account in the ServiceNow instance to downloading and installing the Mid Server. Let us navigate through each of these steps in detail:
1.Let us create a user account in the ServiceNow instance that will be used by the Mid Server to communicate with the ServiceNow instance. An OOB role, mid_server needs to be granted to this account that grants this user account, specific permissions to manage and operate the MID Server. For this blog, we will create a Mid Server account with the username "mid.user" and assign mid_server role to this account. We will also set a default password for this account and change it as per our preference by checking Password needs Reset checkbox as shown below. Please ensure that you are logged in as admin on your PDI while performing these tasks.
2. Next, we will download the Mid Server files on our laptop/desktop. For this blog, we will make use of Mid Server Zip file for installation. If you want to proceed with installation via installer .msi, refer this link Windows Mid Server Installation
To download the ZIP archive, we need to navigate to Mid Server -> Downloads.
The download mid server page will appear. Check the checkbox "Download Mid Server as ZIP Archive"
to download Windows 64-bit zip.
Once the ZIP is downloaded, extract it and move the folder to a location where you want the mid server files to be installed. Now, navigate to agent folder and lookout for config.xml file. Open the config.xml file in Notepad.
3. Next, we will edit this file with our ServiceNow instance details. We will change the URL, mid.instance.username ,mid.instance.password and name parameter to connect to our ServiceNow PDI. Remember to update the instance URL, username and password for the mid.user account as per your PDI and save the file.
4. Now, we will open Command Prompt as an Administrator, navigate to the agent directory and run start.bat file to install and start the Mid Service.
5. Once the Mid Service is started, navigate to mid server -> servers. You would see your Mid server being visible with status as Up and Not Validated.
6. Next, we will validate the Mid Server so that it can execute automation tasks by opening the Mid Server record and clicking on Validate under Related Links.
We will ensure that we set the initial selection criteria to default and click on Save.
Once your Mid Server is validated, it should look as below:
Testing the ServiceNow Mid Server Connectivity
To test ServiceNow Mid Server connectivity and to ensure that we are able to run PowerShell scripts via Mid Server, we will follow below steps:
1. Let us create a Flow Action by navigating to Flow Designer and clicking on New-> Action. Give this action a Name and click on Build Action.
2. Next, we will click on + button and select PowerShell step.
3. We will change the Connection as Define Connection Inline and put the Mid Server IP in the host field. Under the Script Details section, we will select the Script Type as Inline Script and in the Command field, we will make use of PowerShell cmdlet Get-Service to get list of all the services running on your mid server.
4. Let's save the action and click on Test to test whether our action is able to get all the services running on the mid server via PowerShell step or not.
As you can see from the above screenshot, we got all the services on the Mid Server and thus, we are ready to deep dive into the World of Infrastructure automation using ServiceNow.
In the next blog, we will focus on creating a basic PowerShell script and checking how to build an action with inputs and outputs.
If you find this blog helpful, I request you to please like and bookmark it for future reference.
- 573 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.