Solved

Exchange 2010 powershell query

Posted on 2014-09-25
4
284 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
  • 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Intune/ Microsoft EMS 1 31
Exchange 2016 DAG Witness Server 3 37
Lync 2010 4 22
why is pst smaller? 11 13
Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
This article explains how to install and use the NTBackup utility that comes with Windows Server.
In this video we show how to create a Distribution Group 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 Recipients >>…
In this video we show how to create an Accepted Domain 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 >> Ac…

776 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