Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently running Exchange 2007 and Windows Server 2003 ADs. If I wanted to create a user creation/deletion script that would create and delete users, what would be the best way of dealing with this? Powershell from the Exchange server? Some of the things I'd like to do....

  • I'd like to be able to create the AD user
  • Assign a profile path, profile login script and home folder
  • Set password to change on next logon
  • Assign security group membership
  • Assign Distribution group membership
  • Hide a user upon termination (keep mailbox, assign permissions to mailbox to manager or forward e-mails, hide from address list, remove from distribution groups)
  • Delete a user upon/after termination (delete mailbox & user)
share|improve this question

In the past, I've used CSVDE for some scripted Active Directory actions. Here's a couple pages that will introduce the tool for you:

There are other alternatives to csvde, such as Powershell as described here quite well

Deleting a user account is much easier, since all you need to do is remove the record in AD. Here's a page from MS on doing it with VBScript: ADSI Scriptomatic

Now, mailbox actions with Exchange 2007 will require PowerShell cmdlets. Here's a guide on how to accomplish this: User Administration Guide. You can also create entire accounts with this particular cmdlet (New-Mailbox), but it's not as granular as csvde or the other powershell tools.

share|improve this answer

Use powershell. Here is a 4 part series (including screencast) to get you started. Automating User Provisioning, Part 1

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.