Skip to content

Instantly share code, notes, and snippets.

@aaronhoffman
Last active May 22, 2018 15:53
Show Gist options
  • Save aaronhoffman/d5efc68d89995017caa4 to your computer and use it in GitHub Desktop.
Save aaronhoffman/d5efc68d89995017caa4 to your computer and use it in GitHub Desktop.
Get Public IP Address using Powershell
$url = "https://www.icanhazip.com/"
$webclient = New-Object System.Net.WebClient
$ipResp = $webclient.DownloadString($url)
$ip = $ipResp.ToString().Trim()
Write-Output $ip
@aaronhoffman
Copy link
Author

Use this to automatically update SQL Azure firewall rules: http://aaron-hoffman.blogspot.com/2016/02/update-azure-sql-firewall-rule-using.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment