Hi Jonathan,
Here's how to do this using QAD cmdlets:
Get-QADUser -LdapFilter "(mail=*)" -SizeLimit 10 -IncludeAllProperties |
Sort-Object -Property homemdb,Name | Format-Table -GroupBy HomeMDB
This will retrieve the first 10 mail-enabled users, sort them by homeMDB and
then by name, and then output them in a grouped tabular format so that you
can see the mail-enabled users per store. Once you test that and tweak it
to your liking you can either increase the -SizeLimit (up to 1000) or if you
want more than 1000 objects, set -SizeLimit to 0.
FYI, the reason you may have been struggling with homemdb is because it
isn't one of the default properties returned by Get-QADUser.
The -IncludeAllProperties parameter tells the cmdlet to retrieve everything
it can. And the ldap filter of (mail=*) tells it to only retrieve users
that have an email address set (i.e. only users that are mail enabled).
A little simpler than using ADSI, IMO.
--
Kirk Munro
Poshoholic
http://poshoholic.com
"Jonathan Kalmes" <smthng@xxxxxx> wrote in message
news:OwN43xvIIHA.1316@xxxxxx
> Hey all,
>
> I've got another issue I need rescuing from... I keep approaching this
> from different angles and banging my head against a wall every time.
>
> I need to retrieve a list of users on an Exchange 2003 store. I know
> there's an AD property for this called "homeMDB". Unfortunately, it's one
> I can't get to easily using get-QADUser or anything else I've tried.
>
> Anyone got an idea how I can retrieve a list of all users on one store?
> Or, even better, all users that have a mailbox and what store they're on?
>
> --Jonathan