Belirli Bir Port Aralığına Erişim Testi Script
$DomainControllers = @(
"SRVDC01.domain.local",
"SRVDC02.domain.local"
)
foreach ($DC in $DomainControllers) {
foreach ($Port in 49152..65535) {
$check = Test-NetConnection -ComputerName $DC -Port $Port -WarningAction SilentlyContinue
if ($check.TcpTestSucceeded) {
Write-Host ($DC + " on port " + $Port + ": Connection Successful") -ForegroundColor Green
} else {
Write-Host ($DC + " on port " + $Port + ": Connection Failed") -ForegroundColor Red
}
}
}
Active Directory Portları Erişim Testi Script
$DomainControllers = @{
"SRVDC01.domain.local" = @(53,88,464,3268,3269,389,636,135,137,138,139,445,123,49443)
"SRVDC02.domain.local" = @(53,88,464,3268,3269,389,636,135,137,138,139,445,123,49443)
}
foreach ($DC in $DomainControllers.Keys) {
foreach ($Port in $DomainControllers[$DC]) {
$check = Test-NetConnection -ComputerName $DC -Port $Port -WarningAction SilentlyContinue
if ($check.TcpTestSucceeded) {
Write-Host ($DC + " on port " + $Port + ": Connection Successful") -ForegroundColor Green
} else {
Write-Host ($DC + " on port " + $Port + ": Connection Failed") -ForegroundColor Red
}
}
}
İlgili Portlar Şunlardır:
- TCP 445: SMB (Replication, User and Computer Authentication, Group Policy, Trusts)
- TCP 49152-65535 aralığı: DFSR RCP
- UDP 123: W32Time (NTP)
- TCP 49443: ADFS
- TCP 9389: Active Directory Web Services (ADWS)
- TCP/UDP 53: DNS
- TCP/UDP 88: Kerberos
- TCP/UDP 464: Kerberos password change
- TCP/UDP 3268: Global catalog
- TCP/UDP 3269: Global catalog SSL
- TCP/UDP 389: LDAP
- TCP/UDP 636: LDAP SSL
- TCP/UDP 135: RPC
- TCP/UDP 137,138,139: NetBIOS
