How to retain Email field of user AD object even after disabling User mailbox

Hi Experts,

We are having exchange 2013 + Office 365 hybrid setup.

We have a requirement where we need to retain email ID filed of AD user object even after mailbox disabling.

This is to avoid the new user who is joining company not to get same email ID as a user whoc left company some time back

Ex: Amit Kumar left company and his email id was amit.kumar@domain.com - We disabled user ID / Mailbox

One more guy with same name joined & in current scenario the he will also get the same email id as amit.kumar@domain.com

How to avoid this ?

For this we noticed that if email filed in the AD User proerty - General tab- Email - If we have the old email ID stamped the issue will be resolved.

But how do we achieve this automatically for all employees who are leaving the company. 

By default if we disable mailbox the email attribute gets van

April 6th, 2015 7:33am

you can use Get-Aduser to grab it before you disable the mailbox, disable the mailbox, and then use set-aduser to readd the mailbox.

Set-ADuser:

https://technet.microsoft.com/en-us/library/ee617215.aspx?f=255&MSPPError=-2147217396

Get-Aduser: 

https://technet.microsoft.com/en-us/library/ee617241.aspx

Free Windows Admin Tool Kit Click here and download it now
April 6th, 2015 10:40am

Hi Manju,

Thank you for your question.

When the staff leave company, we could disable the user id and mailbox.

When new staff with same name come to company, we could enable AD account and reset password. Then we could create a new mailbox for this staff.

I dont understand the sentence which is But how do we achieve this automatically for all employees who are leaving the company.. please tell me more details.

If there are any questions regarding this issue, please be free to let me know.

Best Regard,

Jim

April 7th, 2015 7:51am

Hi Jim,

My point is if any new user comes with same name ( Not the same left employee coming back)

then we should not give same email ID of the left old employee right? So how do we handle this

ex: old employee with email ID : m.j@pop.com left company

One more user with same name joins company (not the same old MJ :) )

I actually should give m.j2@pop.com but as we disabled the old mailbox & the email ID attribute in AD is removed we may get same email ID for new user.

Basically it is a normal left employee exit process. I need to understand the standard company exit procedure we need to follow

Free Windows Admin Tool Kit Click here and download it now
April 8th, 2015 11:54pm

Hi Manju,

By my experience, we could refer to the following steps:

  1.        Achieve email to PST. Then back up PST.
  2.        Delete email in OST
  3.        Delete mailbox accout
  4.        If there is a new staff, we will create same email id for new staff
  5.        We will create m.j2@pop.com if there are two staffs in company at the same time.

If there are any questions regarding this issue, please be free to let me know. 

Best Regard,

April 9th, 2015 10:44pm

You can script this pretty easily. Here's a quick rundown of what you would want it to do

  1. Use Get-Aduser to grab the SMTP Addresss
  2. Use Disable-Mailbox to disable the mailbox
  3. Set-Aduser to readd the SMTP Address to the account in question.

All the links to how these commands work are in my first post.

Free Windows Admin Tool Kit Click here and download it now
April 10th, 2015 9:03am

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

Other recent topics Other recent topics