-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathOpenWSFCPorts.ps1
More file actions
15 lines (13 loc) · 847 Bytes
/
OpenWSFCPorts.ps1
File metadata and controls
15 lines (13 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
try {
Start-Transcript -Path C:\cfn\log\OpenWSFCPorts.ps1.txt -Append
$ErrorActionPreference = "Stop"
netsh advfirewall firewall add rule name="SQL Server" dir=in action=allow protocol=TCP localport=1433
netsh advfirewall firewall add rule name="SQL Admin Connection" dir=in action=allow protocol=TCP localport=1434
netsh advfirewall firewall add rule name="SQL Service Broker" dir=in action=allow protocol=TCP localport=4022
netsh advfirewall firewall add rule name="AlwaysOn TCPIP End Point" dir=in action=allow protocol=TCP localport=5022
netsh advfirewall firewall add rule name="AlwaysOn AG Listener" dir=in action=allow protocol=TCP localport=5023
netsh advfirewall firewall add rule name="SQL Debugger/RPC" dir=in action=allow protocol=TCP localport=135
}
catch {
$_ | Write-AWSQuickStartException
}