#85967 - 2002-06-06 03:00 PM
Re: Deleting Exchange Mailboxes
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Dean,
I don't think you've properly defined the container path yet. As a test, you can query the mailbox info for your test account. If you can read the info, then, with the appropriate rights, you should be able to delete it.
Your container path should at least include the following:
quote: '--------------------------------------------------------------- ' Build Recipient container's adsPath: ' LDAP://myserver/CN=Recipients, OU=Site, O=Org '--------------------------------------------------------------- ADsPath = "LDAP://" + yourserver ADsPath = ADsPath + "/cn=Recipients,OU=" ADsPath = ADsPath + yourSite ADsPath = ADsPath + ",O=" ADsPath = ADsPath + yourOrg
After you build your container path, then you can grab the mailbox you want to manipulate:
quote:
Set objCont = GetObject(ADsPath)
'---Create a new MailBox--- Set mailBox = objCont.Create("organizationalPerson", "cn=" & strAlias)
The above sample is a VB example to create an account, changing the "create" to "delete" should (I hope) get the job done. Unfortunately, I can't test this with you as I don't have admin rights on our Exchange server (yet).
edit: 'strAlias' is defined earlier in the script as 'username' which in their example is the UID (or Alias of the Exchange account) and the RDN (NT account associated to the mailbox). [ 06 June 2002, 15:12: Message edited by: Chris S. ]
|
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 544 anonymous users online.
|
|
|