Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a way to find all users who don't have SEND AS SELF flag set in Exchange 2010. Without that flag users aren't able to send emails thru SMTP and it seems some users are missing this flag (especially users who used to be Domains Admins etc)

I guess this would have to be similar to query below although this should show users (well not quite as it hides the username) who have Send-as and I'm looking for users who don't.

[PS] C:\Windows\system32>Get-Mailbox | Get-ADPermission | where {($_.ExtendedRights -like "*Send-As*")}

Identity             User                 Deny  Inherited
--------             ----                 ----  ---------
share|improve this question
up vote 2 down vote accepted

Use a foreach loop to iterate through all mailboxes and their permissions, and then print out the identities of the ones where the "NT AUTHORITY\SELF" does not figure:

$mboxes = Get-Mailbox -ResultSize Unlimited
foreach($mbox in $mboxes){
    $currentAlias = $mbox.Alias
    $sendSelf = $mbox | Get-ADPermission | where {($_.ExtendedRights -like "*Send-As*") -and ($_.User -like "NT AUTHORITY\SELF")}
    if($sendSelf -eq $null){
        Write-Host "The user $currentAlias does not have permission to send as himself"

Save as a .ps1 file and execute from the EMS, and there you have it :-)

share|improve this answer
It's showing everyone (including me) that I don't have permission to send as self :-) (and I do) – MadBoy Jan 3 '12 at 21:44
@MadBoy Brainfart, should've been $_.User -like "NT AUTHORITY\SELF" – Mathias R. Jessen Jan 3 '12 at 21:49
Still shows everyone :-) – MadBoy Jan 3 '12 at 21:52
Now you're making me feel stupid, so this time i've tested it... and it works! :D – Mathias R. Jessen Jan 3 '12 at 22:16
It works indeed :-) Thank you. – MadBoy Jan 3 '12 at 22:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.