Link to home
Start Free TrialLog in
Avatar of AManoux
AManoux

asked on

Exchange 2010 powershell query

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.
Avatar of Wasim Shaikh
Wasim Shaikh
Flag of United Arab Emirates image

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

Avatar of AManoux
AManoux

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Eric Woodford
Eric Woodford
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AManoux

ASKER

Thanks ericwoodford.  That did the trick!