# Script PowerShell pour tester les ports nécessaires à l'ajout d'un contrôleur de domaine $Target = Read-Host 'Entrez le nom ou l’adresse IP du contrôleur de domaine existant' Write-Host 'Test DNS (TCP 53)' Test-NetConnection -ComputerName $Target -Port 53 | Format-Table -AutoSize Write-Host 'Test DNS (UDP 53)' Test-NetConnection -ComputerName $Target -Port 53 -InformationLevel Detailed -UdpPort 53 | Format-Table -AutoSize Write-Host 'Test Kerberos (TCP 88)' Test-NetConnection -ComputerName $Target -Port 88 | Format-Table -AutoSize Write-Host 'Test Kerberos (UDP 88)' Test-NetConnection -ComputerName $Target -Port 88 -InformationLevel Detailed -UdpPort 88 | Format-Table -AutoSize Write-Host 'Test LDAP (TCP 389)' Test-NetConnection -ComputerName $Target -Port 389 | Format-Table -AutoSize Write-Host 'Test LDAP (UDP 389)' Test-NetConnection -ComputerName $Target -Port 389 -InformationLevel Detailed -UdpPort 389 | Format-Table -AutoSize Write-Host 'Test LDAPS (TCP 636)' Test-NetConnection -ComputerName $Target -Port 636 | Format-Table -AutoSize Write-Host 'Test Global Catalog (TCP 3268)' Test-NetConnection -ComputerName $Target -Port 3268 | Format-Table -AutoSize Write-Host 'Test Global Catalog SSL (TCP 3269)' Test-NetConnection -ComputerName $Target -Port 3269 | Format-Table -AutoSize Write-Host 'Test RPC (TCP 135)' Test-NetConnection -ComputerName $Target -Port 135 | Format-Table -AutoSize Write-Host 'Test Netlogon (TCP 139)' Test-NetConnection -ComputerName $Target -Port 139 | Format-Table -AutoSize Write-Host 'Test SMB / Netlogon / FRS (TCP 445)' Test-NetConnection -ComputerName $Target -Port 445 | Format-Table -AutoSize Write-Host 'Test RPC dynamique (TCP 49152)' Test-NetConnection -ComputerName $Target -Port 49152 | Format-Table -AutoSize Write-Host 'Test RPC dynamique (TCP 49153)' Test-NetConnection -ComputerName $Target -Port 49153 | Format-Table -AutoSize Write-Host 'Test RPC dynamique (TCP 49154)' Test-NetConnection -ComputerName $Target -Port 49154 | Format-Table -AutoSize Write-Host 'Test RPC dynamique (TCP 49155)' Test-NetConnection -ComputerName $Target -Port 49155 | Format-Table -AutoSize Write-Host 'Test RPC dynamique (TCP 49156)' Test-NetConnection -ComputerName $Target -Port 49156 | Format-Table -AutoSize Write-Host 'Test RPC dynamique (TCP 49157)' Test-NetConnection -ComputerName $Target -Port 49157 | Format-Table -AutoSize Write-Host 'Test RPC dynamique (TCP 49158)' Test-NetConnection -ComputerName $Target -Port 49158 | Format-Table -AutoSize Write-Host 'Test RPC dynamique (TCP 49159)' Test-NetConnection -ComputerName $Target -Port 49159 | Format-Table -AutoSize Write-Host 'Test RPC dynamique (TCP 49160)' Test-NetConnection -ComputerName $Target -Port 49160 | Format-Table -AutoSize Write-Host 'Test RPC dynamique (TCP 49161)' Test-NetConnection -ComputerName $Target -Port 49161 | Format-Table -AutoSize Write-Host 'Test RPC dynamique (TCP 49162)' Test-NetConnection -ComputerName $Target -Port 49162 | Format-Table -AutoSize