Get me all groups I manage

Finding all AD groups someone owns is as easy as:

Get-QADGroup -ManagedBy 'Dmitry Sotnikov'

(Obviously put your name, sAMAccountName, DN, email address or another identifier instead of mine. 😉 )

This is one of the nice little features added in QAD cmdlets 1.3.

One interesting modification of this cmdlet is to look for all groups owned by your reports:

Get-QADGroup -ManagedBy (Get-QADUser -Manager 'Dmitry Sotnikov')

Or with some output:

Get-QADGroup -ManagedBy (Get-QADUser -Manager 'Dmitry Sotnikov') | Format-Table Name, ManagedBy

Now you can see which groups maybe you should no longer manage, or find nice unused groups for some safe experiments. 😉

Advertisements

6 Responses to “Get me all groups I manage”


  1. 1 Jose July 9, 2010 at 1:41 am

    I need to clean up over 1000 DL groups and wanted to see if it’s possible to create a script to email each DL owner with the DL and members details to find out if the DL is still in use and needed?

    • 2 Dmitry Sotnikov July 9, 2010 at 4:47 pm

      Jose,

      Yes, this is absolutely possible. Getting groups is easy with Get-QADGroup. Then you can use the ManagedBy property of the group object to find the owner. I think this will give you the DN, which you can then supply to Get-QADUser to get the actual user object which would have the email address.

      For sending email, Send-MailMessage is your friend.

      If you get stuck you might want to post additional questions to the forums at http://powergui.org

      Dmitry

      • 3 Jose July 12, 2010 at 4:45 am

        I’m new to scripting so I was hoping to find a script I can use. Do you know if there’s already such a script I can use?

  2. 4 Miguel July 10, 2013 at 10:00 am

    How would I get the Owner of the DL? Not the Managedby but the Owner


  1. 1 Active Directory Rodeo 1/5/2010 - The Experts Community Trackback on January 5, 2010 at 1:19 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




My Recent Tweets

Legal

The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

December 2009
M T W T F S S
« Nov   Jan »
 123456
78910111213
14151617181920
21222324252627
28293031  

%d bloggers like this: