pramod1
asked on
office 365, exchange, active directory
all mailboxes are in office 365,
we have on premise active directory where user accounts are synced through AAD sync
i need run powershell commnad to get all distribution list and shared mailboxes.
what command i need to run and pipe into csv file?
we have on premise active directory where user accounts are synced through AAD sync
i need run powershell commnad to get all distribution list and shared mailboxes.
what command i need to run and pipe into csv file?
ASKER
How to pipe into ccsv file
add below redirect command at the end of each command.
> yourfilename.txt
regarding CSV, it depends the content of the text output, you may need to add the field names for CSV file manaully.
> yourfilename.txt
regarding CSV, it depends the content of the text output, you may need to add the field names for CSV file manaully.
here is the Get-DistributionGroupMembe rs.ps1 which exports all the distributed members list with group to CSV..
https://gallery.technet.microsoft.com/office/List-all-Users-Distribution-7f2013b2
https://gallery.technet.microsoft.com/office/List-all-Users-Distribution-7f2013b2
Just pipe Export-csv like:
Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Export-csv c:\dg.csv
Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited | Export-csv c:\dg.csv
ASKER
I am not getting list of shared mailboxes
Can u provide simple command I need to give to user
Can u provide simple command I need to give to user
ASKER
It says cannot bind parameter delimiter cannot concert value mailbox .csv to type system .char?
ASKER
Now I am getting the file but they are containing big numbers not shared mail box name?
can you please post your results here for review? thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Get-DistributionGroup
Get a list of Shared mailboxes
Get-Mailbox -RecipientTypeDetails SharedMailbox -ResultSize:Unlimited
FYI
https://o365info.com/manage-distribution-groups-by-using/
https://blogs.technet.microsoft.com/dpickett/2016/04/29/how-to-get-a-list-of-shared-mailboxes-and-users-with-permissions-to-those-mailboxes-in-exchange-online/