Last active
May 22, 2018 15:53
-
-
Save aaronhoffman/d5efc68d89995017caa4 to your computer and use it in GitHub Desktop.
Get Public IP Address using Powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$url = "https://www.icanhazip.com/" | |
$webclient = New-Object System.Net.WebClient | |
$ipResp = $webclient.DownloadString($url) | |
$ip = $ipResp.ToString().Trim() | |
Write-Output $ip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use this to automatically update SQL Azure firewall rules: http://aaron-hoffman.blogspot.com/2016/02/update-azure-sql-firewall-rule-using.html