DLs and owners

xmouser
xmouser used Ask the Experts™
on
Powershell command to search all the DLs and output a list with the owner(s) of the DLs in a specific OU.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT Infrastructure Architect
Commented:
Use -OrganizationalUnit parameter.. For example..

Get-DistributionGroup -OrganizationalUnit "domain.com/OU/SubOU" -ResultSize Unlimited | Select Name,ManagedBy | Export-Csv C:\test.csv -NoTypeInformation

Open in new window

or
Get-DistributionGroGet-DistributionGroup -OrganizationalUnit "domain.com/OU/SubOU" -ResultSize Unlimited | Select Name,@{N="ManagedBy";E={[string]::join(“;”,$_.managedby)}} | Export-Csv C:\test.csv -NoTypeInformation

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial