Exchange 2010 EMS command question

I'm trying to use the EMS to get only the "PrimaryActiveManager" status from "get-databaseavailabilitygroup -status" command, but I'm not having any luck.  I've tried filtering with the Where-object cmdlet, but I've had no success.
Who is Participating?
Justin YeungConnect With a Mentor Senior Systems EngineerCommented:
it should return just with member name.........

so what do you need???

what if you do

get-databaseavailabilitygroup -status | fl Name,Primary*


get-databaseavailabilitygroup -status | ft Name,Primary*

does it return the result?
Justin YeungSenior Systems EngineerCommented:
get-databaseavailabilitygroup -status | ? {$_.PrimaryActiveManager -like "servername"} | ft

what status you want to get from PrimaryActiveManager?
tballinAuthor Commented:
The status of PrimaryActiveManager should be the name of the active DAG member.  So like "ACMEExch1".
tballinAuthor Commented:
Both work - thanks!
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.

All Courses

From novice to tech pro — start learning today.