Skip to content

Instantly share code, notes, and snippets.

@carlosvargasvip
Created October 12, 2016 19:02
Show Gist options
  • Save carlosvargasvip/8d4d83ac0aafbb61a25b3ae7aa938810 to your computer and use it in GitHub Desktop.
Save carlosvargasvip/8d4d83ac0aafbb61a25b3ae7aa938810 to your computer and use it in GitHub Desktop.
# Author: Carlos Vargas
# Version 1:0
# Scriptname: Get-AzureStackNatIP.ps1
$natip = Invoke-Command -ComputerName mas-bgpnat01 -ScriptBlock {Get-NetIPConfiguration | ? {$_.IPv4DefaultGateway -ne $null } | Foreach {$_.IPv4Address.IPAddress}}
Write-Output "Your IP Address for VPN is : $natip" | Out-File $env:userprofile\downloads\natip.txt
Get-Content $env:userprofile\downloads\natip.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment