- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2017 06:34 AM
Hello,
I am an absolute newbie at orchestration but I am trying to learn how to use PowerShell for orchestrating. I have read and tried some fabulous articles which have been very helpful in preparing a base.
I am trying to run a simple PowerShell script. The problem arises because my workflow picks the default mid server value even if I specify a hostname through input variables through custom PowerShell activity and setting it to Target Host with no luck.
I tried to remove the default value to blank in the mid server properties but that results in Error: The MID Server (null) is not valid.
Any suggestions on how to get it working?
Thanks
~T
Solved! Go to Solution.
- Labels:
-
Orchestration

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2017 07:26 AM
Hi Tiyasa,
You do not have to make changes with IP address in credential table. IP range based MID Server Configuration will be set up based on the below URL.
Below are the two scenarios
- 1) Manual Update: Here we will change the default MID Server manually.
- 2) IP Ranges based: Here we will define IP Ranges for each MID Server. For an example MID Server A, the IP range is 10.10.10.1/24 and MID Server B, the IP range is 192.168.0.1/24. Suppose here we select the default MID Server as A and our Domain server IP is 192.168.0.50. In this scenario when we extend the account from ServiceNow, the workflow automatically pick MID Server B. Because we have specified IP Ranges for each MID Server so it will override the default MID Server use.
Regards,
Vivek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2017 06:43 AM
Hi Tiyasa,
Under orchestration you should see a properties page which says which mid server to use for the orchestration. check the value there is proper or not
In left nav type Orchestration -> MID Server Properties module
Default MID Server to use for Orchestration Activities -> check this property
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2017 06:46 AM
Hi Ankur,
I am aware of the property but if I have multiple mid servers installed, I would like to specify which mid server to be used in the workflow rather than the default mid server.
Does that sound like a valid case?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2017 06:49 AM
Hi Tiyasa,
By default, all the Powershell commands will run in MID Server only. The Target host field is just for ServiceNow to select credentials. If you give MID Server IP as a target host then it will take your MID Server service credential. If you give the IP other than MID Server then it will select the credential from Credential table.
So if you are running a powershell script make sure it works from MID Server.
Regards,
Vivek
Based on the impact hit like, helpful or correct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2017 06:52 AM
If you want to select MID Server at run time. create IP ranges for your MID Server. So based on your Target host IP, ServiceNow will select MID Server.