Link to home
Start Free TrialLog in
Avatar of pramod1
pramod1Flag for United States of America

asked on

powershell, active directory. shared mailbox, distribution group

how to get members of distribution group through windows PowerShell

also how get alias smtp addresses of a shared mailbox through command shell in active directory
ASKER CERTIFIED SOLUTION
Avatar of timgreen7077
timgreen7077

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pramod1

ASKER

It says get distribution group is not recognized as as the name of commandlet

Do I need to umpire any module
Avatar of pramod1

ASKER

I am running on active directory
Avatar of timgreen7077
timgreen7077

the shared mailbox cmdlets will need to be run in o365 shell. the DL can also be run in o365 shell
Avatar of pramod1

ASKER

Thanks that helped  I am trying to find powershell commandlet to get member of

Like one user is member of 20 groups I need to get in csv
run the below to export to csv file:

Get-DistributionGroupMember "DL Group name" | Select DisplayName, primarysmtpaddress | Export-CSV C:\temp\results.csv
Avatar of pramod1

ASKER

Thank you sir
sure thing