Email address preservation after Exchange decommissioning
Hi,I want to decommission an Exchange 2000 environment completely, but I don't want my usersEmail address property in AD to get erased.Is there a way to do this?Thanks
February 24th, 2009 5:28pm

There are 3 attributes that deal with smtp addresses (on an exchange mailbox user)"mail""proxyAddresses""targetAddress"#2 and #3 go away when the users mailbox is deleted, however "mail" is what's displayed in the AD Users and Computers "General" tab, and this attribute, while set by Exchange initially, isnt actually used for mail flow. I would expect this attribute to stay populated when the mailbox is deleted. Is this not the case for you?UPDATE: I just tested this for Exchange 2007 and the "mail" attribute was unchanged after I deleted a user's mailbox. I would continue to assume this is the same in Exchange 2000. Mike Crowley: MCT, MCSE, MCTS, MCITP: Enterprise Administrator / Messaging Administrator
Free Windows Admin Tool Kit Click here and download it now
February 25th, 2009 12:49am

When trying to uninstall the Exchange 2000 server, I get a message telling me that the server cannot be uninstalled because there are active mail boxes on the servers and that I should either move them or delete them. I don't want to move them because I'm removing Exchange completely, so when I delete them, the Email attribute in AD gets deleted also.
February 25th, 2009 6:23am

Interesting, this is not the case for Exchange 2007 and I don't think it was for Exchange 2003 either.You do have to delete the mailboxes before you remove the server - there is no way around that. Perhaps make an ldf backup of those attributes and then restore them once mailboxes are deleted. Mike Crowley: MCT, MCSE, MCTS, MCITP: Enterprise Administrator / Messaging Administrator
Free Windows Admin Tool Kit Click here and download it now
February 25th, 2009 10:25pm

I first thought of running a DSQUERY piped to a DSMOD command to reestablish the email attribute, but this will not work because the users email address is different then any attribute in AD. (dsquery user -name "*" | dsmod user -email "$username$@contoso.com")So I searched for a script that exports the user Atrribute into an ldf file and I modified it so it will export the mail attribute and the targetAddress attribute (because it's also deleted by Exchange 2000).Before I remove exchange, I'll run the script, and after I remove exchange, I'll import theldf fileusing ldifde.exe.The script is below: '---Startscript--- ' 'Thisscriptwillconnecttoyourdefaultnamingcontext 'inActiveDirectoryandbuildanldifde.exeimportfile 'forallusersandtheire-mailaddresses. 'ThedefaultfilenameisuserMailAddresses.ldf ' '------------------------------------------------------- ' 'Copyright(C)2006MicrosoftCorporation 'Youhavearoyalty-freerighttouse,modify, 'reproduceanddistributethissampleapplication '(oranymodifiedversion)inanywayyoufinduseful, 'providedthatyouagreethatMicrosofthasnowarranty, 'obligationsorliabilityforresultsproducedbythisor 'yoursampleapplication. ' '--------------------------------------------------------- DimexportFileName Dimcount DimFileObject DimLogFile DimConnection DimCommand DimRecordSet ConstWritable=2 exportFileName=InputBox("Enterannamefortheldifdeimportfile;"&_ ".ldfwillbeaddedtothefilename.","e-mailaddressimportgenerator",_ "userMailAddresses") count=0 SetFileObject=CreateObject("Scripting.FileSystemObject") SetLogFile=FileObject.OpenTextFile(exportFileName&_ ".ldf",Writable,True) SetConnection=CreateObject("ADODB.Connection") SetCommand=CreateObject("ADODB.Command") SetRecordSet=CreateObject("ADODB.RecordSet") WithConnection .Provider="ADsDSOObject" .Open"ActiveDirectoryProvider" EndWith SetCommand.ActiveConnection=Connection SetobjRootDSE=GetObject("LDAP://rootDSE") Command.CommandText="<LDAP://"&_ objRootDSE.Get("defaultNamingContext")_ &">;(&(objectCategory=user)(proxyAddresses=*))"&_ ";distinguishedName,mail,targetAddress;subtree" SetRecordSet=Command.Execute WhileNotRecordSet.EOF OnErrorResumeNext strUserDN=RecordSet.Fields("distinguishedName") strMail=RecordSet.Fields("mail") strTargetAddress=RecordSet.Fields("targetAddress") LogFile.Write"dn:"&strUserDN&vbCrLf LogFile.Write"changetype:modify"&vbCrLf LogFile.Write"replace:mail"&vbCrLf LogFile.Write"mail:"&strMail&vbCrLf LogFile.Write"-"&vbCrLf&vbCrLf LogFile.Write"dn:"&strUserDN&vbCrLf LogFile.Write"changetype:modify"&vbCrLf LogFile.Write"replace:targetAddress"&vbCrLf LogFile.Write"targetAddress:"&strTargetAddress&vbCrLf LogFile.Write"-"&vbCrLf&vbCrLf countcount=count+1 RecordSet.MoveNext Wend LogFile.Close msgbox"Exported"&count&"usersand"&_ "theire-mailaddressesto"_ &exportFileName&".ldf" SetobjRootDSE=Nothing SetFileObject=Nothing SetLogFile=Nothing SetConnection=Nothing SetCommand=Nothing SetRecordSet=Nothing '---endscript---
February 25th, 2009 11:18pm

Yep, that's exactly what I recommend. The targetAddress though... this is not the same field thats populated on the "general" tab of ADUC. Are you sure you want to re-populate that as well? I'm not sure if that will cause any problems if Exchange is ever re-introduced. Mike Crowley: MCT, MCSE, MCTS, MCITP: Enterprise Administrator / Messaging Administrator
Free Windows Admin Tool Kit Click here and download it now
February 26th, 2009 7:42pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics