locked
How to determine what groups are being used to manage groups. RRS feed

  • Question

  • Referencing the following article: http://blogs.technet.com/b/exchange/archive/2011/05/04/how-to-manage-groups-with-groups-in-exchange-2010.aspx

     In Exchange 2010, distribution groups can't be managed by groups - only individual users can manage groups. So it's possible that using Exchange 2003, you used groups to manage a distribution group. Group ownership was handled at a different level. Now that these mailboxes have been moved to Exchange 2010, members of these groups can't modify the group.

     

    How to I determine what distribution groups are being managed by groups?  How would I write this to pull it from AD?  I know I need to use a custom script, I am having issues with what ad attribute to look for to accomplish this.

    thx in advance

    l1b3r4l



    • Edited by l1b3r4l Monday, November 14, 2011 8:10 PM
    Monday, November 14, 2011 7:58 PM

Answers

  • Hi,

    Please try below cmdlet:

    get-distributionGroup| where{($_.CustomAttribute5).tostring() -like "CN=*"}| fl name, ManagedBy

    I have tested it and it worked in my environment.

    Hope it helps.


    Best Regards!
    • Marked as answer by Rowen-Xu Saturday, November 26, 2011 2:39 AM
    Tuesday, November 15, 2011 5:02 AM
  • On Mon, 14 Nov 2011 21:47:53 +0000, l1b3r4l wrote:
     
    >
    >
    >Yes, this does work thanks. The only problem is that I have a very large amount of groups. I was hoping a I could create a script that would only report back with the groups that are managed by groups. THis will work..just some manual parsing I guess.
     
    Try this:
     
    get-distributiongroup | foreach {
    if ($_.ManagedBy -is [object])
    {
    $m = get-recipient ((get-recipient
    $_.distinguishedname).ManagedBy)
    if ($m -is [object] -and $m.recipienttype -like "*group*")
    {
    $_ | select name, managedby
    }
    }
    }
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    • Marked as answer by Rowen-Xu Saturday, November 26, 2011 2:39 AM
    Tuesday, November 15, 2011 11:00 PM

All replies

  • Would this not work?

     

    Get-DistributionGroup | fl name, ManagedBy

     

    The name of the object in the ManagedBy line should tell you if it's a user or group, right?

     

     

    Monday, November 14, 2011 9:27 PM
  • Yes, this does work thanks.  The only problem is that I have a very large amount of groups.  I was hoping a I could create a script that would only report back with the groups that are managed by groups.  THis will work..just some manual parsing I guess.

     

    Thanks again.

     

    l1b3r4l

    Monday, November 14, 2011 9:47 PM
  • Hi,

    Please try below cmdlet:

    get-distributionGroup| where{($_.CustomAttribute5).tostring() -like "CN=*"}| fl name, ManagedBy

    I have tested it and it worked in my environment.

    Hope it helps.


    Best Regards!
    • Marked as answer by Rowen-Xu Saturday, November 26, 2011 2:39 AM
    Tuesday, November 15, 2011 5:02 AM
  • On Mon, 14 Nov 2011 21:47:53 +0000, l1b3r4l wrote:
     
    >
    >
    >Yes, this does work thanks. The only problem is that I have a very large amount of groups. I was hoping a I could create a script that would only report back with the groups that are managed by groups. THis will work..just some manual parsing I guess.
     
    Try this:
     
    get-distributiongroup | foreach {
    if ($_.ManagedBy -is [object])
    {
    $m = get-recipient ((get-recipient
    $_.distinguishedname).ManagedBy)
    if ($m -is [object] -and $m.recipienttype -like "*group*")
    {
    $_ | select name, managedby
    }
    }
    }
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    • Marked as answer by Rowen-Xu Saturday, November 26, 2011 2:39 AM
    Tuesday, November 15, 2011 11:00 PM