none
PowerShell cmd to Get DL along with Owners RRS feed

  • Question

  • Need small help,   i need a power shell cmd or script which will give me the list of all the Distributions list along with the OWNERS of that like managed by ... so i tried the below but not getting the output in appropriate manner.  Like Display Name and Managed By " Owners name only" For the owners it's coming "domainname/OU/Users OU/<User name>" But i need it in Display Name and Owners Name Only .

    Like Below:-

    Display Name        Managed BY

    DL1         user1

    DL2                         User2

    get-distributiongroup -resultsize unlimited |ft name, managedby

    Wednesday, June 27, 2012 3:36 PM

Answers

  • Hi

    Please try the command

    get-distributiongroup -resultsize unlimited |ft Displayname, @{Name='Managedby'; Expression={[String]::join(";",($_.managedby.item(0).name))}}

    Cheers


    Zi Feng

    TechNet Community Support

    Friday, June 29, 2012 3:49 AM
    Moderator

All replies