Thor Logo dbatools

Firewall

Get-DbaFirewallRule

Andreas Jordan (@JordanOrdix), ordix.de

Get-DbaFirewallRule View Source Andreas Jordan (@JordanOrdix), ordix.de Windows, Linux, macOS Synopsis Retrieves Windows firewall rules for SQL Server components from target computers for network troubleshooting and security auditing. Description Retrieves Windows firewall rules for SQL Server components from target computers, helping DBAs troubleshoot connectivity issues and audit network security configurations. This command queries firewall rules for the SQL Server Engine, Browser service, and Dedicated Admin Connection (DAC) to identify which ports are open and what programs are allowed through the firewall.

Read more

New-DbaFirewallRule

Andreas Jordan (@JordanOrdix), ordix.de

New-DbaFirewallRule View Source Andreas Jordan (@JordanOrdix), ordix.de Windows, Linux, macOS Synopsis Creates Windows firewall rules for SQL Server instances to allow network connectivity Description Creates inbound Windows firewall rules for SQL Server instances, Browser service, and Dedicated Admin Connection (DAC) to allow network connectivity. This automates the tedious post-installation task of configuring firewall access for SQL Server, eliminating the need to manually determine ports and create rules through Windows Firewall GUI or netsh commands.

Read more

Remove-DbaFirewallRule

Andreas Jordan (@JordanOrdix), ordix.de

Remove-DbaFirewallRule View Source Andreas Jordan (@JordanOrdix), ordix.de Windows, Linux, macOS Synopsis Removes Windows firewall rules for SQL Server Engine, Browser, and DAC connections from target computers. Description Removes Windows firewall rules for SQL Server components from target computers, cleaning up network access rules when decommissioning instances or changing security configurations. This command only works with firewall rules that were previously created using New-DbaFirewallRule, as it relies on specific naming conventions and rule groups.

Read more