#
# mbox_perms.ps1
#
# Written by Carol Wapshere, September 2008
#
# Use to create assign Full Mailbox Access to another user.
#
# Instructions:
#
#  1. Modify the mbox_perms.csv file to include information about the mailbox and user.
#     The file must have a header row and must include the following fields:
#           dn,uid
#     where
#           dn is the full DN of the account associated with the mailbox
#           uid is the username in the format BBHFGG\sAMAccountName
#
#  2. Open the Exchange Management Shell
#
#  3. CD to C:\scripts and run mbox_perms.ps1.
cat mbox_perms.csv > unicode.csv # make utf8
import-csv unicode.csv | foreach {
write-host $_.dn
write-host $_.uid
Add-MailboxPermission -Identity $_.dn -User $_.uid -AccessRights 'FullAccess'
}