Skip to content

Instantly share code, notes, and snippets.

@itpropro
Created March 4, 2016 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itpropro/b983f2e61aa801a14802 to your computer and use it in GitHub Desktop.
Save itpropro/b983f2e61aa801a14802 to your computer and use it in GitHub Desktop.
$ips = @()
foreach ($i in 1..254)
{
$ips += "192.168.0.$i"
}
New-NetFirewallRule -Protocol TCP –LocalPort 3389 -Profile Public -DisplayName 'RDP VPN S2S' -Direction Inbound -Action Allow -RemoteAddress $ips
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment