Hi - I am trying to import a list of users, get mailbox permissions and export results to a .csv file. If i have just one name in the input file it works as soon as I have multiple it does not.If I use -append it errors (I believe it is cause I am using version 2.0 of PS EMS) any suggestions?
$users = get-content “mailboxusers.txt”
foreach ($user in $users) {
Get-MailboxPermission -identity $user | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false} | Export-Csv MailboxAccess.csv;
}