Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #written by pan_2.livejournal.com
- #get external ip address using 2ip.ru service
- function Get-MyExternalIp
- {
- $client = New-Object system.net.webclient
- $text = $client.DownloadString("http://2ip.ru")
- $AllMatches = [regex]::matches($text,'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}')
- $AllMatches[0].Value
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement