-----provide ad\exchange\lync\sharepoint\crm\sc\o365 and other Microsoft product implementation and outsourcing, qq:185426445. Phone 18666943750
Users need to bulk import mailboxes, providing information such as name, alias, organizational unit, display name, login name, password, company name, department, mailbox quotas, and tables such as
650) this.width=650; "Width=" "height=" 439 "title=" QQ picture 20160513001036.png "style=" width:714px;height:290px; "alt = "Wkiol1c0q_ghjv1vaaghvyx5b24414.png" src= "Http://s3.51cto.com/wyfs02/M00/80/05/wKioL1c0q_GhJv1vAAGHVYX5B24414.png"/>
Step 1, enter the following command in PowerShell:
Add-pssnapin microsoft.exchange*
Import-module ActiveDirectory
Import-csv C:\mbxinfo.csv | Foreach-object '
{
New-mailbox-name $_.name-alias $_.alias-organizationalunit $_.ou-displayname $_.displayname-userprincipalname $_. UPN '
-password (convertto-securestring-string $_.pwd-asplaintext-force)
Set-mailbox-identity $_.upn-issuewarningquota $_. Issuewarningquota-prohibitsendquota $_. Prohibitsendquota '
-prohibitsendreceivequota $_. Prohibitsendreceivequota-usedatabasequotadefaults $false
Set-user-identity $_.upn-company $_.company-department $_.dept
}
650) this.width=650; "Width=" "height=" title= "qq picture 20160513001036.png" style= "width:720px;height:619px" alt= "Wkiol1c0rzswc4nlaaer4ogdu1e156.png" src= "Http://s1.51cto.com/wyfs02/M00/80/05/wKioL1c0rZSwC4NlAAEr4oGDU1E156.png"/>
Step 2, we check, you can see the mailbox and AD accounts have been batch built
650) this.width=650; "Width=" 686 "height=" 461 "title=" QQ picture 20160513001036.png "style=" WIDTH:719PX;HEIGHT:486PX; "alt= "Wkiol1c0rhyqymldaaczlbqacac399.png" src= "Http://s3.51cto.com/wyfs02/M02/80/05/wKioL1c0rhyQymLdAACzlbqAcAc399.png"/>
650) this.width=650; "Width=" 765 "height=" 530 "title=" QQ picture 20160513001036.png "style=" WIDTH:720PX;HEIGHT:497PX; "alt= "Wkiom1c0rxhamby9aabv4_j7rxa800.png" src= "Http://s3.51cto.com/wyfs02/M02/80/08/wKiom1c0rXHAMBy9AABV4_j7RxA800.png"/>
This article is from the "Zhou Ping Microsoft Technology Exchange Platform" blog, please be sure to keep this source http://yuntcloud.blog.51cto.com/1173839/1772885
PowerShell Management Series (31) PowerShell Operations Batch mailbox creation