prashant06
asked on
Get all users under Managed By in AD Group
Hi,
In Exchange 2010 distribution group, Group Information, Managed by, we can added multiple name in it. We would like to create a power shell to get a list of these users. Please advise how to do it. Thanks!
In Exchange 2010 distribution group, Group Information, Managed by, we can added multiple name in it. We would like to create a power shell to get a list of these users. Please advise how to do it. Thanks!
Get-DistributionGroup -ResultSize unlimited | Select-object Name,@{label=”ManagedBy”;e xpression= {[string]( $_.managed by | foreach {$_.tostring().split(“/”)[ -1]})}},Pr imarysmtpa ddress | export-csv “c:\managedby.csv”
I just tried it on my exchange 2013 and it works perfectly
see the script, it is ended with export-csv “c:\managedby.csv”, so in C:\ you will get a CSV named managedby contains the result
{Can it filter out those records where MangedBy is empty}
it is another question and must be asked separately in a new question...
it is another question and must be asked separately in a new question...
ASKER
The managed by will have multiple user name. How to put in a separator, such as ;, between them?
run the script, it will arrange it in the same cell with comma
ASKER
I already run the script but there is no comma in the ManagedBy field.
you are right, also I just run it and there is no comma, but it will list all the users who managed the group but without comma
ASKER
can it be done? Since I want to generate a report to show who manage which group.
does it not helpful unless there is a comma between names?
the idea is to list all users who managed the groups regardless the comma, I am trying to find it out and include comma
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.