Quest PowerShell extensions rock too

When my co-worker (who is interested in learning PowerShell too) asked me how to get a list of all the members of a given Security group, I didn't have a ready answer for him. I hadn't had occasion to learn how to do that yet and a quick search didn't show anything obvious or simple.

I had read in various blog posting and on the Microsoft newsgroups about Quests PowerShell extensions. As they were supposed to make some Active Directory related tasks easier, I thought this was the perfect time to try them out.

One download and install later I was looking through the 109 page Active Roles Management Shell for Active Directory guide and there in the table of contents was the Get-QADGroupMember commandlet on page 59.

Get-QADGroupMember domainName\GroupName

This gets us name type and DN. To much information and not quite what we need. So off to our favorite discovery tool
Get-QADGroupMember domainName\GroupName | Get-Member -MemberType property

This lets us discover the properties that allow us to use PowerShell's filtering capabilities. As my co-worker needs the logonname and the displayname, we came up with this final code.
Get-QADGroupMember domainName\GroupName | select logonname, dislayname

The total time it took to get here was about 10 minutes. My co-worker is now even more excited about learning PowerShell. So much to learn, so little spare time.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h3> <blockquote> <img>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options