• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 590
  • Last Modified:

Deny all users access to OWA 2007, Help with Powershell

Im new ( and very green) to power shell and Im looking for a easy way to deny all my users from accessing OWA.  We only want a few of our users to have access to it.  So with out having to go into the properties of several hundred email boxes and removing the right manualy, is there a commandlet that I can use to do this for me in mass for all users, and then go back in and add those few users that I want to have access?
0
CCNPwanabe
Asked:
CCNPwanabe
  • 4
  • 2
1 Solution
 
Xenus99Commented:
Try
Set-CASMailbox user -OWAEnabled $false
0
 
CCNPwanabeAuthor Commented:
I have to do it for all users... with that command cover that.  Also I dont know if it has any bearing on it, but I am using multiple storage groups with multiple databases...
0
 
CCNPwanabeAuthor Commented:
Im a bit affraid to rin commands that Im not sure of their final outcome but tell me if Im on the right track.  Im thinking this would work...
get-casmailbox | foreach {if ($_.owaenabled -eq $true){$_.name}} | Set-CASMailbox {$_.User} -OWAEnabled $false
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
Xenus99Commented:
0
 
CCNPwanabeAuthor Commented:
Thanks but with out knowing enough about this monster, Im gonna need some more help on exactly what it is that I should enter in...
thanks for the link though, good stuff!
0
 
CCNPwanabeAuthor Commented:
get-casmailbox | foreach {if ($_.owaenabled -eq $true){$_.name}} | Set-CASMailbox -OWAEnabled $false

Was the winner, for anyone who needs to know this....
thsi command finds all the users that have OWA enabled in the mailbox and then sets that attribute to disabled.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now