Exchange Server Share

June 11, 2008

Find Exceptional Mailboxes in Exchange Environment

In Exchange 2003, we are using Active Directory Users & Computers to find some of the exceptional users/mailboxes up to certain level (may be with custom LDAP query) in the environment but in Exchange 2007 Management Console we have certain limitations to find it but there PowerShell helps you.

In Exchange 2007 Management Console we can filter recipients for below attributes and values are matching, available or unavailable.

image

ActiveSynch Mailbox Policy
Alias
City
Company
Country/Region
Custom Attribute 1-15
Database
Department
Display Name
E-Mail Addresses
First Name
Last Name

Managed Folder Mailbox Policy
Name
Office
Postal Code
Recipient Type Details
Server
State Or Province
UM Enabled
Unified Messaging Mailbox Policy
User logon name (pre-Windows 2000)
User logon name (User Principal Name)

But how do we find find below exceptional users/mailboxes in Exchange environment?

  1. All users with Forwarding Address is set.
  2. All mailboxes with quota limit is NOT set to default.
  3. All users set as hidden in GAL.
  4. All users whose mail item retention period is NOT default.
  5. All users who has some “Send on Behalf Of” set.
  6. All mailboxes with antispam bypass is set.
  7. All mailboxes with rules quota increased.

Let’s discuss one by one in detail for Exchange 2007 as well as in Exchange 2003 with an example.

1. Find all users with Forwarding Address is set.

Please refer my previous post FAQ: Find all users with Forwarding Address is set

2. Find all mailboxes with quota limit is NOT set to default.

Exchange 2003:

Custom LDAP Search: (mailNickname=*)(mDBUseDefaults=FALSE)

Example: I have set mailbox quota limit of User 32 manually.

image

Now find it with Custom LDAP Search.

Active Directory Users & Computers -> Find -> Select Custom Search -> Enter (mailNickname=*)(mDBUseDefaults=FALSE) in LDAP Query Text Box -> Click Find Now.

image

Exchange 2007:

PowerShell Command: Get-Mailbox | Where {$_.UseDatabaseQuotaDefaults -eq $false} | Select Name, IssueWarningQuota, ProhibitSendQuota, ProhibitSendReceiveQuota

Example: I have set mailbox quota of User 22 manually.

image

Now find it with PowerShell.

image

3. Find all users set as hidden in GAL.

Exchange 2003:

Custom LDAP Search: (objectClass=*)(msExchHideFromAddressLists=*)

Example: I mark hide User 32 from Exchange Address Lists.

image

Now find it with Custom Search.

Active Directory Users & Computers -> Find -> Select Custom Search -> Enter (objectClass=*)(msExchHideFromAddressLists=*) in LDAP Query Text Box -> Click Find Now.

image

Note: Here in LDAP query is set to objectClass=* so it gives all hidden object, if you select objectClass=user then it gives only users. 

Exchange 2007:

PowerShell Command: Get-Mailbox | Where {$_.HiddenFromAddressListsEnabled -eq $True} | Select Name, HiddenFromAddressListsEnabled

Example: I mark hide User 22 from Exchange Address Lists.

image

Now find it with PowerShell.

image

4. Find all users whose mail item retention period is NOT default.

Exchange 2003:

Custom LDAP Search : (objectClass=*)(deletedItemFlags=*)

Example : I set custom retention period for mail items on User 32.

image

Now find it with Custom Search.

Active Directory Users & Computers -> Find -> Select Custom Search -> Enter (objectClass=*)(deletedItemFlags=*) in LDAP Query Text Box -> Click Find Now.

image

Exchange 2007:

PowerShell : Get-Mailbox | Where {$_.UseDatabaseRetentionDefaults -eq $False} | Select Name, UseDatabaseRetentionDefaults

Example: I set custom retention period for mail items on User 22.

image

Now find it with PowerShell.

image

5. Find all users who has some “Send on Behalf Of” set.

Exchange 2003:

Custom LDAP Search: (objectClass=*)(publicDelegates=*)

Example: I grant Send On Behalf Of for User 32.

image

Now find it with Custom Search.

Active Directory Users & Computers -> Find -> Select Custom Search -> Enter (objectClass=*)(publicDelegates=*) in LDAP Query Text Box -> Click Find Now.

image

Exchange 2007:

PowerShell : Get-Mailbox | Where {$_.GrantSendOnBehalfTo -ne $null} | Select Name, GrantSendOnBehalfTo

Example: I grant Send On Behalf Of for User 22.

image

Now find it with PowerShell.

image

6. Find all mailboxes with antispam bypass is set.

This is new feature of Exchange 2007.

Exchange 2007:

PowerShell: Get-Mailbox | Where {$_.AntispamBypassEnabled -eq $True} | Select Name, AntispamBypassEnabled

Example: I have set to bypass the antispam for User 22.

image

Now find it with PowerShell.

image

7. All mailboxes with rules quota increased.

This is new feature of Exchange 2007.

Exchange 2007:

PowerShell: Get-Mailbox | Where {$_.RulesQuota -ne "64KB"} | Select Name, RulesQuota

Example: I increased Rule Quota for User 22.

image

Now find it with PowerShell.

image

 

Note: You would have seen that Powershell command can handle Exchange 2003 queries also so in co-existing environment it is very easy with PowerShell cmdlets and scripts to generate this kind of reports.

==========================================================

About these ads

6 Comments

  1. [...] Find Exceptional Mailboxes in Exchange Environment [...]

    Pingback by Weekend reading - subject: exchange — June 13, 2008 @ 6:06 pm

  2. Hi Amit,
    Is there a way for mailbox quotas set for individual mailboxes to revert back to use mailbox store quotas in Exchange 2007.

    We migrated from exhange 2003 to exchange 07 with higher mailbox quotas and some of the 03 users had custom mailbox quotas, we now have a bigger mailbox in 07 and want all users of 07 to use the default exchange 2007 mailbox store quotas.
    pls advice

    Comment by Bosco Joseph — October 9, 2008 @ 5:06 pm

  3. Hi Bosco,

    You can set quota to use default setting on all the mailboxes with below command.

    Get-Mailbox | Where {$_.UseDatabaseQuotaDefaults -eq $false} | Set-Mailbox -UseDatabaseQuotaDefaults $True

    I would suggest you to try for any test user first.

    Get-Mailbox “Test User” | Where {$_.UseDatabaseQuotaDefaults -eq $false} | Set-Mailbox -UseDatabaseQuotaDefaults $True

    Comment by Amit Tank — October 9, 2008 @ 5:13 pm

  4. Hi Amit,

    is there a way for a Costum LDAP Search to find all mailboxes with Send-As permission assigned?

    CU
    tosc

    Comment by Torsten Schüßler — October 21, 2008 @ 8:28 am

  5. Hello Tosc,

    I think we can not get Send-As permission with LDAP because it is stored in AD ACLs. Not sure if Exchange 2007 Shell works for Exchange 2003 users but you can try…

    How To: Find All Mailboxes with Send-As Permission Assigned
    http://exchangeshare.wordpress.com/2008/09/01/how-to-find-all-mailboxes-with-send-as-permission-assigned/

    Comment by Amit Tank — October 21, 2008 @ 11:44 am

  6. Hi Amit,

    I thought as much! So far, I’ll your “How to:…”
    THX

    CU
    tosc

    Comment by Torsten Schüßler — October 22, 2008 @ 3:13 pm


RSS feed for comments on this post.

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 30 other followers

%d bloggers like this: