- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
In continuation to previous blog post ServiceNow Orchestration and Powershell : Setup your virtual AD serverServiceNow Orchestration and Powershell : Setup your virtual AD server in a series of Orchestration and Powershell, we are now going to set-up and test communication between our
- ServieNow instance
- Host machine (laptop or desktop) where MID server is installed
- guest machine where Server 2008 R2 is installed on VMware workstation.
I have windows 7 installed with Powershell 4.0 on my host machine.
You can check what version of Powershell you are running by executing "Get-PSsnapin" command.
Also, MID server is installed on host machine, which runs Powershell commands or scripts on all network windows machines, hence we require to enable "RSAT" (Remote Server Administration Tools") first so that we can run our "Active Directory" commands on remote server (Guest Active Directory Server).
RSAT setup is available here.
Steps to install RSAT are documented on below link.
https://4sysops.com/archives/how-to-install-the-powershell-active-directory-module/
Turn on your virtual guest machine if not done already.
Once done, run "Import-Module ActiveDirectory" command on host machine.
You might observe some warning message related to PSDrive, you can ignore it.
Test connection between host and guest machines
Now, test the connection between MID Server and Windows AD server.
Open command prompt on MID Server, type "ping IPAdressOfADServer".
You should see the ping response, this ensures that MID Server host is connected to guest AD Server
Perform the same test on AD Server, replace IP address with MID Server IP address. You should see the ping response, this ensures AD server is connected to MID Server.
Test connection between ServiceNow, host and guest machine.
Now, configure the "Credentials" in ServiceNow to authenticate against "Active directory domain" as shown. Remember, you need to supply AD server login ID details here.
Configure Test workflow with "Run Powershell" activity.
In hostname activity, put IP address of the "AD Server"
Put command "whoami" (Who am I?)
Run the workflow by using "Start Workflow" workflow action and notice the output of the command in "ecc queue". Also, output should be available in "system logs"
Now, run the same command again by changing hostname to "localhost". This command will be executed on MID Server, your host machine. In the output of ecc queue or logs, you should see your login ID printed out.
Successful output in both cases indicates there is a network connectivity, authentication has been established and we are ready to move ahead.
Kindly do not forget to like or bookmark this article if it helps you.
- 3,910 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.