A client wants me to fix activesync on his exchange 2010 server, previous admin messed with it. They have two DC's (old2008 and new2012r2) and two exchange servers (old2007 and new2010). Both exchange servers show the virtual directories are present in IIS Manager, SSL is set, and no redirects. However "Get-ActiveSyncVirtualDirectory" shows virtual directory is present in old2007 exchange server only. Nothing there in new2010 exchange server. "New-ActiveSyncVirtualDirectory" says the virtual directory "already exists" on the new2010 exchange server and therefore refuses to create one. "Remove-ActiveSyncVirtualDirectory" say it "Doesn't exist" and therefore refuses to remove anything. So "New-" says it already exists, and "Remove-" says its not there. ("Set-" also says its not there.)
This has the focus of my attention.
Including -DomainController and using either DC changes nothing, including -ExternalURL or -InternalURL also changes nothing. The external MX record has a higher priority pointing to the new2010 address, and autodiscover is a cname pointing to the same. Internal DNS looks good.
I'm not sure what else I can tell you. I'm looking for suggestions on what to look at or try next.
Run "Set-AdServerSettings -ViewEntireForest $true", then run "Get-ActiveSyncVirtualDirectory" on Exchange 2010 and check the result.
Also, open ADSI Edit and connect to Configuration, check the object below:
OK I finally have this one resolved, I want to share the solution in case someone else runs into it. Everything that follows here requires full Admin rights.
Please run from powershell (on the exchange server)
$Site = [ADSI]"IIS://localhost/W3SVC/1/Root/Microsoft-Server-ActiveSync"
and then run
$site
Result:
distinguishedName:
Path: {C:\Program Files\Microsoft\Exchange Server\V14\Client Access\Sync}
Next run:
$Site = [ADSI]"IIS://localhost/W3SVC/1/Root" $site.Delete("IIsWebVirtualDir","Microsoft-Server-ActiveSync") $site.SetInfo()
This will remove the phantom virtual directory.
Now run:
iisreset
Now run:
New-activesyncvirtualdirectory -websitename "Default Web Site"
it should recreate the new virtual directory.
Run iisreset again, and edit the internal and external URL's
Then go get yourself a cold one.