Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Finding a user's exchange server
Thanks for any tips
And here's some sample code:
AddExtender("WWADS34I.DLL") AddExtender("WWWNT34i.DLL") PDCD = AskLine ("Domain","Enter The Domain (Usually IWS).","IWS") PDC = wntGetDc ("",PDCD,1) :ExchLoop ExAdsiPath = AskLine("Exchange Server", "Enter the Exchange Server for the LDAP search", "ehud08") ExchCheck = wntServerInfo(ExAdsiPath, 1) If LastError() == 524 Display (4,"Exchange Server access error", "Cannot Access %ExAdsiPath%%@CRLF%Please select another Exchange Server") gosub ExchLoop endif sAdsiPath = "LDAP://%ExAdsiPath%/o=ml" ;** Normally use the line UserName = wntUserInfo(0) for when a use logs on Username = "malbrjo" userSID = wntAcctInfo( pdc, username, 1) aAdsiPath = DsFindPath(sAdsiPath, "Assoc-NT-Account=%userSID%") errormode (@Off) HomeExchangeA = dsGetProperty(aAdsiPath, "Home-MTA") HomeExchangeB = StrScan(HomeExchangeA, ",", 20, @FWDSCAN) HomeExchangeServer = strSub (HomeExchangeA,21,HomeExchangeB - 21) message (Username,HomeExchangeServer)
Article ID: W15043
File Created: 2002:09:19:14:48:06
Last Updated: 2002:09:19:14:48:06