header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
How to get -ManagedBy attribute of DistributionGroup ?
Last Post 28 Jun 2010 05:47 AM by jbarnes. 4 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Laeeq QaziUser is Offline
New Member
New Member
Posts:36
Avatar

--
15 Nov 2007 02:55 AM

    Hi there,

            I just want to get the attribute -ManagedBy of DistributionGroup in E2K7. How to get it ?    

            I couldn't retireve the -ManagedBy parameter of a distributionGroup using the CmdLet           

                 get-distributionGroup  | format-list name,ManagedBy

             It just returned the name of the DistributionGroup not the ManagedBy attribute.

            Before this I created the DistributionGroup using the CmdLet

                New-DistributionGroup -Name "Managers" -OrganizationalUnit "fabrikam.com/domain1.com" - SAMAccountName "Managers" -Type "Distribution" -ManagedBy "user1@domain1.com"

            I can also retrieve the DistributionGroup successfully using:

                get-distributionGroup   -ManagedBy "laeeq1@domain1.com"    
         
             which only shows name, DisplayName, GroupType, and PrimarySMTPAddress .


      best regards,
      Laeeq

    regards, Laeeq Qazi
    Brandon Shell [MVP]User is Offline
    Basic Member
    Basic Member
    Posts:396
    Avatar

    --
    15 Nov 2007 06:40 AM
    I preface this with I dont know really know exchange and there may be an exchange way to do this.

    You can use the Quest tools for this as well.

    Get-QADGroup -Name $GroupName | %{$_.managedBy}
    Brandon Shell
    ----------------
    Microsoft Powershell MVP
    https://mvp.support.microsoft.com/profile/Brandon
    Blog: http://www.bsonposh.com
    Karl MitschkeUser is Offline
    Basic Member
    Basic Member
    Posts:451
    Avatar

    --
    15 Nov 2007 08:46 AM

    Hello;

    Use get-recipient for this.

    (All on one line)

    Get-Recipient -RecipientType MailUniversalSecurityGroup,MailUniversalDistributionGroup,MailNonUniversalGroup,DynamicDistributionGroup |fl Name,ManagedBy

    Karl

    http://unlockpowershell.wordpress.com
    Co-Author, Windows PowerShell 2.0 Bible
    -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
    Laeeq QaziUser is Offline
    New Member
    New Member
    Posts:36
    Avatar

    --
    16 Nov 2007 02:23 AM
    Hi there,
    Thanx KarlMitschke for your valuable reply. It really work.
    I used get-recipient like :

    Get-Recipient -identity "Managers@domain1.com" -RecipientType MailUniversalD istributionGroup | format-listl Name,ManagedBy

    best regards,
    Laeeq
    regards, Laeeq Qazi
    jbarnesUser is Offline
    New Member
    New Member
    Posts:1
    Avatar

    --
    28 Jun 2010 05:47 AM
    Karl, I tried running your script and it works if I do it on one line and run it. What I need is to output it to a CSV file but when I do, all it has in it is some gobblety-gook that makes no sense. is there something more other than just adding another pipe to the end and adding export-csv "filelocation.csv"?
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer