Test-sqmSQLFirewall
Maintenance sqmSQLTool v1.8.2+
Tests whether the firewall and network allow a TCP connection to SQL Server.

Examples

Test-sqmSQLFirewall -Server "SQL01"
Test-sqmSQLFirewall -Server "SQL01"

    Tests the default instance on TCP port 1433.
Test-sqmSQLFirewall -Server "SQL01" -Port 54321
Test-sqmSQLFirewall -Server "SQL01" -Port 54321

    Tests a custom port.
Test-sqmSQLFirewall -Server "SQL01" -Instance "SAGE"
Test-sqmSQLFirewall -Server "SQL01" -Instance "SAGE"

    Determines the dynamic port of the "SAGE" instance via SQL Browser (UDP 1434)
    and then tests the TCP connection.
"SQL01","SQL02","SQL03" | Test-sqmSQLFirewall -Instance "PROD" -TimeoutSeconds 3
"SQL01","SQL02","SQL03" | Test-sqmSQLFirewall -Instance "PROD" -TimeoutSeconds 3

    Tests the "PROD" instance on three servers via pipeline.
Compare-sqmServerConfiguration -SourceInstance "SQL01" -TargetInstance "SQL02"
Compare-sqmServerConfiguration -SourceInstance "SQL01" -TargetInstance "SQL02"