Get Public IP Address

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


This Automation Policy will query 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("")

$resp = $r.GetResponse()

$reqstream = $resp.GetResponseStream()

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

$result = $sr.ReadToEnd()

write-host $result