EXCH07: Enable a mailbox from another server using powershell
We have a server which checks a database for new employees every day. If found a new user which does not exist in AD, we create the user with a random password and it gets emailed to an admin after user is created, home folder etc and such is created, and then finally, enabling the user for email.After upgrading to Exchange 2007, this script no longer work.I wonder if somebody could help me with the following:Which files do i need to copy from the exchange server to make a powershell script run to enable the new AD users' mailbox?How can I call this script from another program?Do you mind also give me the script?
February 3rd, 2009 12:20am

1- You can download the exchange powershell tools from Microsoft at:http://www.microsoft.com/downloads/details.aspx?familyid=6BE38633-7248-4532-929B-76E9C677E802&displaylang=en2- You can run a powershell script from another script / program by following these steps: http://www.microsoft.com/technet/scriptcenter/topics/winpsh/manual/run.mspx#ECEAC3- What I do in our environment is have a script that runs every day at a specified time. Then it checks an OU for non-email enabled users and then creates a mailbox for them. Here is the script that I use for this task.This checks the OU /Corp/Users for user objects, and then email enables each of them. Adding them to a Temp Mail store that we have. (I later move them into their correct mail store, based on their department) $a = get-user -OrganizationalUnit "[YOURDOMAININFO]/Corp/Users" -RecipientTypeDetails "User" foreach ($item in $a) {enable-mailbox -Identity $item -Alias $item.SamAccountName -Database "EX01\TempSG1\TempSG1-MS1"}
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2009 2:00am

Hi, Regarding this issue, I suggest you write a post on our Development forum: http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads/ Thanks, Elvis
February 6th, 2009 6:16am

continued on http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/f5d5b10a-725d-474f-aeb5-adac07960e87
Free Windows Admin Tool Kit Click here and download it now
February 9th, 2009 3:58pm

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

Other recent topics Other recent topics