Where is Azure AD Connect installed?

This has happened to me more than once. I need to force an AAD Connect sync, but can’t find the server it’s installed on. And of course it’s not been documented anywhere.

So I’ve knocked up a quick little powershell script to locate which servers on the network have AAD Connect installed.  It’s not fool-proof, but it’s better than nothing.

$Servers = Get-ADComputer -Filter {OperatingSystem -Like "Windows Server*"} -Properties * | Sort name
ForEach ($Server in $Servers){
$ServerName = $Server.Name
$Path = "\$ServerNameC$Program FilesMicrosoft Azure AD Sync"
$Test = Test-Path $Path
IF ($Test -eq $true){ Write-Host "***** FOUND *****"}
Write-Host "$ServerName - $Test"
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s