Forum Discussion
Marvin Oco
Apr 15, 2019Iron Contributor
What is the script for send on behalf permission?
We have send as script for Send As: $access = "SendAs" $mailbox = Get-Mailbox -Identity MYSHAREDMAILBOX $identity = $mailbox.UserPrincipalName $permissions = Get-MailboxPermission -identity $id...
bartthemustang
May 20, 2019Copper Contributor
check if this helps,
$mailbox = Get-Mailbox -Identity MYSHAREDMAILBOX
$identity = $mailbox.UserPrincipalName
$users = Import-Csv -Path "C:\path\members.csv" -Delimiter ";"
foreach($user in $users){
try{
$setPermissions = Set-Mailbox -Identity $identity -GrantSendOnBehalf $user
Write-Host "Successfully added permissions for $user" -ForegroundColor Green
}catch{
Write-Host "Failed to add permissions for $user" -ForegroundColor Red
}
}
~Bart