N-central Help

Get Public IP Address

Quick Description This Automation Policy retrieves the public IP of a device.
Applies To On-premises SolarWinds N-central
Last Revised Feb. 21, 2012


This Automation Policy will query http://ifconfig.me/ip to retrieve the public IP of the device.

Input Parameters

No input parameters are required.

Automation Policy


Public IP of device is retrieved.


Retrieve Public IP Powershell code:

$r = [System.Net.WebRequest]::Create("http://automation.whatismyip.com/n09230945.asp")

$resp = $r.GetResponse()

$reqstream = $resp.GetResponseStream()

$sr = new-object System.IO.StreamReader $reqstream

$result = $sr.ReadToEnd()

write-host $result