Solved

Exchange 2010 powershell query

Posted on 2014-09-25
4
287 Views
Last Modified: 2014-09-26
I would like to use the Get-CASmailbox command to find out which users have OWA enabled, however, I would like to limit the query to only users who are a member of a specific email distribution group.
0
Comment
Question by:AManoux
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Expert Comment

by:Vaseem Mohammed
ID: 40343436
Check this one liner, Provide a GroupName
Get-DistributionGroup <GroupName>| Get-DistributionGroupMember | foreach{Get-CASMailbox $_.samaccountname | where OWAEnabled -EQ $True |select Name, SAMAccountName, OWAEnabled, PrimarySMTPAddress}

Open in new window

0
 
LVL 1

Author Comment

by:AManoux
ID: 40344329
with that command I get this error...

ForEach-Object : Cannot bind parameter 'FilterScript'. Cannot convert the "OWAEnabled" value of type "System.String" to type "System.Management.Automation.ScriptBlock".
At line:1 char:87
0
 
LVL 3

Accepted Solution

by:
ericwoodford earned 500 total points
ID: 40346612
slight modification to Vaseem's script..

Get-DistributionGroupMember "group name"  | Get-CASMailbox | Where-object {$_.owaenabled}

Open in new window


Get-distributiongroupmember returns mail enabled objects. If they are all mailboxes, this shouldn't generate errors. Only issue being it doesn't recurse into subgroups. OWAEnabled is a true/false property, therefore our where-object will return 'true' results.
0
 
LVL 1

Author Closing Comment

by:AManoux
ID: 40346820
Thanks ericwoodford.  That did the trick!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
This video discusses moving either the default database or any database to a new volume.
Suggested Courses
Course of the Month11 days, 5 hours left to enroll

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question