Retrieving Group Membership for Active Directory from the Command Line

To create a list of regular users in an Active Directory group using the CLI:

dsquery group domainroot -name groupname | dsget group -members | dsget user -fn -ln

  fn             ln

  John          Brown
  Bill          Smith

dsget succeeded