-----provide ad\exchange\lync\sharepoint\crm\sc\o365 and other Microsoft product implementation and outsourcing, qq:185426445. Phone 18666943750
Today in a group to hear such a requirement, after you create a new batch of AD accounts, mailbox-enable these ad accounts, and set rules for these mailboxes, and disable access to OWA and ActiveSync.
Step 1, Batch build AD account reference blog PowerShell Management Series (i) Active direcrtory Management: User management, http://yuntcloud.blog.51cto.com/1173839/1394495
Step 2, enable the mailbox that has already been set up and give $ A to the account. The command is as follows:
[PS] C:\windows\system32> $a =get-user-recipienttypedetails user-filter {userprincipalname-ne $Null} | Enable-mailbox
650) this.width=650; "title=" 1.png "style=" HEIGHT:350PX;WIDTH:717PX; "alt=" Wkiol1s7mjvb_zhyaaf6nv9l5zm450.jpg "src= "Http://s3.51cto.com/wyfs02/M02/58/BD/wKioL1S7MjvB_zHyAAF6NV9L5zM450.jpg" width= "991" height= "401"/>
Step 3, disable mailbox-enabled OWA and ActiveSync permissions. The command is as follows:
[PS] C:\windows\system32>foreach ($b in $a) {set-casmailbox-identity $b. name-activesyncenabled: $false-owaenabled:$ False
650) this.width=650; "title=" 1.png "style=" height:465px;width:715px; "alt=" Wkiol1s7mqhcec4vaaltitq42oi949.jpg "src= "Http://s3.51cto.com/wyfs02/M00/58/BD/wKioL1S7MqHCeC4vAALTiTQ42oI949.jpg" width= "996" height= "554"/>
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/1605261
PowerShell Management Series (12) Exchange new-enabled mailboxes disable OWA and ActiveSync access