Disable OWA for All Users Except One Group

Hello,

Our company wants to disable OWA for all users except the users in the "Managers" AD security group. I came up with this script below but wanted to know if there was a better way. Also from my searches, there is still no way to make OWA disabled for new users by default?

Thank you.

AD level 2003 on 2008R2 DC's
Exchange 2010 SP3

Get-Module -ListAvailable | Import-Module

get-mailbox -OrganizationalUnit "OU=Users,DC=MyDomain,DC=com" | Set-CasMailbox -OWAEnabled $False

Get-ADGroup -filter {name -like 'Managers'} | Get-ADGroupMember -Recursive | Get-ADUser -Properties MailNickName | select -ExpandProperty MailNickName | Set-CasMailbox -OWAEnabled $true

Open in new window

matt160Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Soufiane Adil, Ph.DIT, Network Architect - CCNP/CCDPCommented:
hi

I think you can use your webfilter like Fortinet to do it

souf
0
Joshua HopkinsPresidentCommented:
Your scripts are going to be the best way to handle this.  You can also schedule them to run so you dont forget when there are new employees added
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
matt160Author Commented:
Thank you. I just wanted to make sure I wasn't missing something. The script has been added to the Exchange maintenance script.

Souf, we did not want to block it for all users, just a certain group.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.