Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Creating users in Exchange 2007

Posted on 2009-05-05
1
Medium Priority
?
280 Views
Last Modified: 2012-08-14
Hi

At the moment, we use ADUC to create users. The general method is to copy an account that already exists.

Does anyone know if it's possible to create a mailbox enabled account with Exchange 2007 powershell by copying another one? Or do I need to enter all the attributes in the Powershell commands?

Thanks!
0
Comment
Question by:kam_uk
1 Comment
 
LVL 7

Accepted Solution

by:
flaphead_com earned 2000 total points
ID: 24312039
to create a mailbox you need to specify
-database
-password
-UserPrincipalName
-Name
-OrganizationalUnit

You can take it all from a CSV or use something this this
$user     = Read-Host "Enter Username.."
$password = Read-Host "Enter Password.." -AsSecureString
$OU       = Read-Host "Enter OU........"
 
IF ($OU.length -eq 0) 
{
	$OU = "e2k7.local/MyUsers"
}
 
$database = "e12powershell\First Storage Group\Mailbox Database"
$ExternalEmailAddress = $user + "@e2k7.local"
$txtfile = $user + ".txt"
new-mailbox -database $database -password $password -UserPrincipalName $ExternalEmailAddress -Name $user -OrganizationalUnit $OU
 
get-mailbox $user 
get-mailbox $user | fl | out-file $txtfile | notepad $txtfile
"Provisioning complete"		 

Open in new window

0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Suggested Courses

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question