Forum Discussion

j_zap's avatar
j_zap
Copper Contributor
Aug 04, 2021

Exchange Distribution Group Security Owner

Hi All,

First let me say I'm not looking for a distribution group owner.  I've been tasked to get the Advanced Security Owner of each group.  Please see below.  Looking to do this with PowerShell so I can export to csv.

Thanks,

John

  • j_zap 

     

    $DLs= Get-ADGroup -Properties * -Filter * | where {$_.GroupCategory -eq 'Distribution'} | select DistinguishedName
    $DLs | ForEach-Object {dsacls $_.DistinguishedName | select-string "^Owner"}
     
    Or you can directly use get-distributiongroup cmdlet on EMS.
  • aliat_IMANAMI's avatar
    aliat_IMANAMI
    Brass Contributor

    j_zap 

     

    $DLs= Get-ADGroup -Properties * -Filter * | where {$_.GroupCategory -eq 'Distribution'} | select DistinguishedName
    $DLs | ForEach-Object {dsacls $_.DistinguishedName | select-string "^Owner"}
     
    Or you can directly use get-distributiongroup cmdlet on EMS.
    • j_zap's avatar
      j_zap
      Copper Contributor

      aliat_IMANAMI Perfect this is exactly what I'm looking for.  Quick question, how do I add the Distribution Group that correlates to the owner?  I tried adding it, but have been unsuccessful.

      Thanks!!

      • aliat_IMANAMI's avatar
        aliat_IMANAMI
        Brass Contributor
        Do you want to add a distribution group that has the owner as member of that group or do you want to add a DL to the membership of another DL having the same owner as the other distribution group?
         
        In either way this is a doable. The user account have the insufficient permissions to manage distribution group. However, if you have sufficient permission you can do it via exchange, by opening up the Exchange Management Console, under recipient configuration select distribution groups, right click the group you want to add other groups to and select properties, navigate to members and click add. Else you can use a exchange shell command
         
        Add-DistributionGroupMember -Identity "Xyz" -Member "abc@groupid.com"

        this adds "abc" to the distribution group named as "Xyz"

Resources