1

I'm a domain admin trying to create an export of all AD users, recording all msExch attributes (Exchange 2010).

The following works fine:

Get-ADUser <sAMAccountName> -Properties * | Select name, *msexch*

The following doesn't:

Get-ADUser -Filter * -Properties * | Select name, *msexch*

Instead I get a column named msexch with no value

What am I missing?

  • What version of powershell are you using? – Gerald Schneider Dec 17 '18 at 14:28
  • Version 5.0. I'm pretty sure I'm good on that front. – jshizzle Dec 17 '18 at 14:30
1

It should work after you add the searchbased to narrow down on your scope. Get-ADUser -searchbase "OU=ParentOU,OU=All Users,DC=domain.DC=local" -Filter * -Properties * | Select name, msexch

I find similar issues as you if a searchbase is not specified while your filter is wild open "eg. *"

|improve this answer|||||
  • Nice one thanks. This does the job although interestingly, if you pipe through to sort, it excludes the attributes once again. No issue though as filtering can be done in Excel regardless. – jshizzle Dec 18 '18 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.