Get AD Group info using PowerShell

 

Here's a PowerShell command that will help get a few of the properties you need from an Active Directory group, filtered by the name with a wildcard. it outputs a table of groups that match the filter clause.

Import-Module ActiveDirectory
Get-ADGroup -Filter "name -like 'GroupNameGoesHere-*'" -Properties * | Select-Object cn,  @{Label = "Manager";Expression = {%{(Get-AdUser $_.managedBy -Properties DisplayName).DisplayName}}}, description

Sources:
Share on Google Plus

About Tom DeMeulenaere

Highly accomplished information technology professional with extensive knowledge in System Center Configuration Manager, Windows Server, SharePoint, and Office 365.
    Blogger Comment

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.