mid server dnslookup

dbaril
Tera Expert

Is there a way to execute a DNSLOOKUP of a server through the mid-server and return the IP Address?   I need to initiate the discovery of a server from a workflow but all I have is the server name. I found the following WIKI article to initiate the discovery via script, however the discoveryFromIP method requires an IP address.

https://wiki.servicenow.com/index.php?title=DiscoverNow#gsc.tab=0

Thank you

1 REPLY 1

Community Alums
Not applicable

It sounds like you want the workflow to run secure shell, or powershell command.


    These workflow activities are added by the "Activate Plugin" -> "Orchestration: Powershell"   plugin if you are using an out-of-box personal-developer-instance.
    The command to lookup an IP from a servername is "nslookup servername" or maybe use "ping -n 1 servername", the same as entered at a command prompt.
The results will contain the IP address, or a "non-existent domain" message which can be parsed.


    see the wiki for     Run Powershell activity   or   Run Command activity for ssh.



Also, the CI may already have an IP associated.


      I would check the table before adding the delay of running a command on a remote server.