Link to home
Start Free TrialLog in
Avatar of Dell Admin
Dell Admin

asked on

How to know what mailboxes are with "Send As" permission set?

I need two PowerShell commands:
one to give all mailboxes with not-empty "Send As" permission, and the other to give all mailboxes with not-empty "Full Access" permission.  

Can you help please?
Avatar of Jacob Durham
Jacob Durham
Flag of United States of America image

Get-Mailbox -resultsize "Unlimited" | Get-ADPermission | where {($_.ExtendedRights -like “*Send-As*”) -and -not ($_.User -like “NT AUTHORITY\SELF”)} | Format-Table -AutoSize

Open in new window


Get-Mailbox -resultsize "Unlimited" | Get-MailboxPermission | where { ($_.AccessRights -eq "FullAccess") -and ($_.IsInherited -eq $false) -and -not ($_.User -like "NT AUTHORITY\SELF") } | Format-Table -AutoSize 

Open in new window



via
Avatar of Dell Admin
Dell Admin

ASKER

Thanks Job for the response. It seems including too many records and kind of got stuck there. So can you tell me how to limit for only the active Mailboxes or enabled User Mailboxes only?
foreach ($user in (Get-User -RecipientTypeDetails UserMailbox -ResultSize Unlimited | where {$_.UseraccountControl -notlike "*accountdisabled*"})) 

{Get-Mailbox -resultsize "Unlimited" | Get-ADPermission | where {($_.ExtendedRights -like “*Send-As*”) -and -not ($_.User -like “NT AUTHORITY\SELF”)}}

Open in new window

This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.