Exchange 2010 EMS command question

tballin
tballin used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Justin YeungSenior Systems Engineer

Commented:
get-databaseavailabilitygroup -status | ? {$_.PrimaryActiveManager -like "servername"} | ft

what status you want to get from PrimaryActiveManager?

Author

Commented:
The status of PrimaryActiveManager should be the name of the active DAG member.  So like "ACMEExch1".
Senior Systems Engineer
Commented:
it should return just with member name.........

so what do you need???

what if you do

get-databaseavailabilitygroup -status | fl Name,Primary*

or

get-databaseavailabilitygroup -status | ft Name,Primary*


does it return the result?

Author

Commented:
Both work - thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial