Advertisement
kjacobsen

get-externalip2

Jan 27th, 2013
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Code Snippet from aperturescience.su
  2. function Get-ExternalIP
  3. {
  4.         Param
  5.         (
  6.                 [String]$ipcheckurl = "http://icanhazip.com/"
  7.                 #Alternative URLS
  8.                 #       http://automation.whatismyip.com/n09230945.asp
  9.                 #       http://whatismyip.akamai.com/
  10.                 #       http://b10m.swal.org/ip
  11.         )
  12.     return (get-webpage -url $ipcheckurl -useragent "Mozilla/5.0 (Windows NT 6.2; WOW64)")
  13. }
  14. # Code Snippet from aperturescience.su
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement