Skip to content

Instantly share code, notes, and snippets.

@developerprofiles
Forked from samonzeweb/fwsql.ps1
Created February 4, 2021 16:47
Show Gist options
  • Select an option

  • Save developerprofiles/acb665b0d7716a714a88fc4ee8e820be to your computer and use it in GitHub Desktop.

Select an option

Save developerprofiles/acb665b0d7716a714a88fc4ee8e820be 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