I found this one the other day while looking for something else but its something that pops up for me now and again. If you want to find out which Domain Controller your Exchange server is currently using you can use the DirectoryServer property from the IExchangeserver Interface with CDOEXM. To use it in a script its just 3 lines
Set iExchSvr = CreateObject("CDOEXM.ExchangeServer")
iExchSvr.datasource.open "Servername"
wscript.echo iExchSvr.DirectoryServer
Set iExchSvr = CreateObject("CDOEXM.ExchangeServer")
iExchSvr.datasource.open "Servername"
wscript.echo iExchSvr.DirectoryServer