Group-object cmdlet to give all values back

Hi, 

I use this easy powershell command today :

get-mailbox -resultsize unlimited | where {$_.customattribute2 -eq "not_personal"} | group-object -Property Database -NoElement | Sort-Object Name 

This give me the result i look for. But to ease the merge I would like that all databases in my exchange environment should be "counted". 

This give me how many with this attribute in given database. How can I achieve that databases with 0 also returns this value ?

Probably rather easy but i don't see it :) 

Regards


June 24th, 2015 8:11am

You can't.  Databases with zero mailboxes will not exist in your query.
Free Windows Admin Tool Kit Click here and download it now
June 24th, 2015 10:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics