ISW-Tools

SQL Server Ports per Powershell konfigurieren

Jörn Walter Veröffentlicht Aktualisiert 2 Min. Lesezeit Skripte

SQL Server – Konfigurieren der Firewall Ports

Mit diesen kurzen Zeilen lassen sich die notwendigen Ports für die Inbetriebnahme eines SQL Servers konfigurieren.

SQL Server – Konfigurieren der Firewall Ports

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

# Aktivieren der Ports für den SQL Server
New-NetFirewallRule -DisplayName „SQL Admin Connection“ -Direction Inbound –Protocol TCP –LocalPort 1434 -Action allow
New-NetFirewallRule -DisplayName „SQL Server“ -Direction Inbound –Protocol TCP –LocalPort 1433 -Action allow
New-NetFirewallRule -DisplayName „SQL Debugger/RPC“ -Direction Inbound –Protocol TCP –LocalPort 135 -Action allow
New-NetFirewallRule -DisplayName „SQL Database Management“ -Direction Inbound –Protocol UDP –LocalPort 1434 -Action allow
New-NetFirewallRule -DisplayName „SQL Service Broker“ -Direction Inbound –Protocol TCP –LocalPort 4022 -Action allow

# Aktivieren der Ports für SQL Analysis
New-NetFirewallRule -DisplayName „SQL Browser“ -Direction Inbound –Protocol TCP –LocalPort 2382 -Action allow
New-NetFirewallRule -DisplayName „SQL Analysis Services“ -Direction Inbound –Protocol TCP –LocalPort 2383 -Action allow

# Aktivieren von weiteren Ports
New-NetFirewallRule -DisplayName „SQL Server Browse Button Service“ -Direction Inbound –Protocol UDP –LocalPort 1433 -Action allow
New-NetFirewallRule -DisplayName „HTTP“ -Direction Inbound –Protocol TCP –LocalPort 80 -Action allow
New-NetFirewallRule -DisplayName „SSL“ -Direction Inbound –Protocol TCP –LocalPort 443 -Action allow

# Setzen der Settings für das Standardverhalten
Set-NetFirewallProfile -DefaultInboundAction Block -DefaultOutboundAction Allow -NotifyOnListen True -AllowUnicastResponseToMulticast True

# Weitere Informationen
https://docs.microsoft.com/de-de/sql/sql-server/install/configure-the-windows-firewall-to-allow-sql-server-access?view=sql-server-ver15

SQL Server Ports per Powershell konfigurieren

Ashampoo® Backup Pro 14

Porträt Jörn Walter

Jörn Walter

Inhaber von IT-Service Walter in Euskirchen, betreut Windows-Umgebungen von Unternehmen und entwickelt die ISW-ADTools.

Alle Beiträge von Jörn Walter