Forum Discussion
Find out a server with Azure AD Connect
You can check the Azure AD Connect install or sync service by follow PS:
Checked install
$servers = "Server1", "Server2", "Server3" # Replace with your server names
foreach ($server in $servers) {
$installedPrograms = Get-WmiObject -Class Win32_Product -ComputerName $server | Where-Object { $_.Name -like "*Azure AD Connect*" }
if ($installedPrograms) {
Write-Output "$server: Azure AD Connect is installed."
} else {
Write-Output "$server: Azure AD Connect is not installed."
}
}
Check Sync service
$servers = "Server1", "Server2", "Server3" # Replace with your server names
foreach ($server in $servers) {
$service = Get-Service -ComputerName $server -Name "ADSync" -ErrorAction SilentlyContinue
if ($service) {
Write-Output "$server: Azure AD Connect Sync service is running."
} else {
Write-Output "$server: Azure AD Connect Sync service is not found."
}
}