Forum Discussion
Marvin Oco
Feb 17, 2021Iron Contributor
export shared mailbox permission
hi, i have script below to export permission of shared mailbox. issue is that the exported csv file exported 1 shared mailbox only. ______________________________________________________ ...
VasilMichev
Feb 17, 2021MVP
You are effectively overwriting the CSV file on each iteration, use the -Append switch:
Export-Csv C:\Users\contoso\Desktop\sharedmailbox.csv –NoTypeInformation -Append
I would also suggest to use a proper identifier for the mailbox, as Name might not be unique. Something like $mailbox.UserPrincipalName should work better.