Skip to content

Instantly share code, notes, and snippets.

@samonzeweb
Created March 9, 2018 10:12
Show Gist options
  • Save samonzeweb/d86125626b5df1c60e761fd6c9fd856a to your computer and use it in GitHub Desktop.
Save samonzeweb/d86125626b5df1c60e761fd6c9fd856a to your computer and use it in GitHub Desktop.
Open firewall ports for SQL Server with PowerShell
# SQL Sever & firewall : https://docs.microsoft.com/en-us/sql/sql-server/install/configure-the-windows-firewall-to-allow-sql-server-access
# New-NetFirewallRule : https://docs.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule?view=win10-ps
New-NetFirewallRule -DisplayName "SQLServer default instance" -Direction Inbound -LocalPort 1433 -Protocol TCP -Action Allow
New-NetFirewallRule -DisplayName "SQLServer Browser service" -Direction Inbound -LocalPort 1434 -Protocol UDP -Action Allow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment