We help IT Professionals succeed at work.
Get Started

Exchange 2007: DSGET and DSQUERY returning erro when listing members of distribution group

Lokton23 asked
Last Modified: 2012-05-09
Need to pull member's names and corresponding email addresses from distribution lists.  
Distribution groups are Universal.
There are domain users and contacts listed in the each groups.

Previously, was able to use the following DSGET and DSQUERY command:

dsquery group -name "GROUP NAME"|dsget user -samid -email >c:\file.txt

Now I receive the following error when I run this on multiple distribution groups:

The object class of the target does not match the one specified on the command line.
type dsget /? for help.[PS] C:\Windows\system32>:

Any help would be appreciated.

Watch Question
PowerShell Developer
Top Expert 2010
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE