• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

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.
0
tballin
Asked:
tballin
  • 2
  • 2
1 Solution
 
Justin YeungCommented:
get-databaseavailabilitygroup -status | ? {$_.PrimaryActiveManager -like "servername"} | ft

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

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now