:: Enable Inbound TCP Port 1433 for SQL Server netsh advfirewall firewall add rule name="SQL Server TCP Inbound" dir=in action=allow protocol=TCP localport=1433 :: Enable Outbound TCP Port 1433 for SQL Server netsh advfirewall firewall add rule name="SQL Server TCP Outbound" dir=out action=allow protocol=TCP localport=1433 :: Optional: Verify the rules were added netsh advfirewall firewall show rule name=all | findstr "SQL Server"