[ExchangeList] Import Mass mail enabled users

  • From: Christian Petrou <lightit@xxxxxxxxxxx>
  • To: "'exchangelist@xxxxxxxxxxxxx'" <exchangelist@xxxxxxxxxxxxx>
  • Date: Thu, 13 Dec 2007 09:54:56 -0800

http://www.msexchange.org
-------------------------------------------------------Looking to get mass mail 
enabled users created in Exchange 2007 through the command shell.
This is what I have so far which works great and I would like to add onto it so 
more user information is imported at the same time.

$Password = Read-Host "Type the default password for the new accounts" 
-AsSecureString

Import-Csv C:\users.csv | foreach { New-Mailbox -alias $_.Alias -name $_.Name 
-UserPrincipalName $_.UPN -Database "Name" -OrganizationalUnit 
"domain.local/Users - Sub OU/Name of OU" -Password $Password }

Here is what I would like to add:
First Name
Last Name
Mobile Phone
Company
Title
And specific email address set as primary since we have several .com's we use.

I have been looking for some sort of "field ID tags" for the fields, and then 
it would be pretty easy to script it using the base  of { -ID Tag Name $._ID 
Tag Name }.



Christian



-------------------------------------------------------
List Archives: http://www.freelists.org/archives/exchangelist/
MSExchange Newsletter: http://www.msexchange.org/pages/newsletter.asp
MSExchange Articles and Tutorials: http://www.msexchange.org/articles_tutorials/
MSExchange Blogs: http://blogs.msexchange.org/
-------------------------------------------------------
Visit TechGenix.com for more information about our other sites:
http://www.techgenix.com
-------------------------------------------------------
To unsubscribe visit http://www.msexchange.org/pages/exchangelist.asp
Report abuse to listadmin@xxxxxxxxxxxxxx

Other related posts: