Is it possible to set up a ping request so an agent can type in an IP address and it pings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2015 05:19 AM
I'm wondering if it's possible to set up the ability for someone to be able to do something like go to the Technical Catalog and instead of choosing something such as "Request for Backup", "Install Software", etc,.. to set up a "Ping Request" so that it would be possible to enter an IP address and ServiceNow would ping it and give the results back.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2015 08:15 AM
You could do this through Orchestration and PowerShell. It sounds like you don't want to use a catalog item, but you could add a UI Action to do it from any form or make a UI Page that includes it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2015 07:16 AM
Sorry for the late reply, how would you go about setting something like this up?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2015 10:22 AM
Hello Kevin,
You could create a UI Action that runs a workflow with its script something like this:
var wf = new Workflow();
var workflowID = wf.getWorkflowFromName("Your Workflow Name Here");
wf.startFlow(workflowID, current, current.operation);
You would then create a workflow with that name that contains a Run Powershell activity with a script that includes something like this:
$ips = [System.Net.Dns]::GetHostAddresses(${Your HostName Variable String})
$ips.ipaddresstostring
In the Sensor Script you would set the output to a workflow scratchpad variable:
workflow.scratchpad.output = output;
And then a following Set Value workflow activity to set that workflow.scratchpad.output to work_notes (or wherever you want it to go).
This is obviously very basic. You'd probably want to add error handling among other things.