PowerShell Management Series (12) Exchange new-enabled mailboxes disable OWA and ActiveSync access

Source: Internet
Author: User

-----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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.