Exchange 2010 count mailbox mobile devices partnership

In Exchange Server environment where is a limit of ActiveSync partnership with mailbox.

When you reach this limit then you won’t be able to connect any new devices to the mailbox.

This limit is set in ThrottlingPolicy using parameter EASMaxDevices

To check current setting of EASMaxDevices, open Exchange Management Shell and run:

Get-ThrottlingPolicy | select name, EASMaxDevices, EASMaxConcurrency


As a result you will get all ThrottlingPolicies available in Exchange environment and how many mobile devices can you connect to the mailbox, and also using EASMaxConcurrency you will see how many connections in one time can be accepted to the mailbox.



Continue reading

Print Friendly

Distribution Groups nested – get list only groups

Recently, we described how to obtain a list of all mailboxes in the group that has nested distribution groups.

Unfortunately, using this method, you can not get a list of groups in a distribution group, only users (mailboxes).

To obtain this list, you need to write more or less complicated powershell script or use the additive Quest Powershell Module for Active Directory.


After installation of Quest Module, run powershell console and run:

add-PSSnapin quest.activeroles.admanagement

Continue reading

Print Friendly

Get distribution group all members – nested

How can we get a list of mailboxes belonging to a distribution group?
In a simple way, by using the EMC console and check who is a member of a group, or by using powershell EMS console and use the command:

Get-DistributionGroupMember Test_Group


In this way we get a list of objects in the group, both mailboxes, contacts, and other groups.

And here there is a problem, because if the distribution group includes the next distribution group, and this again next etc, how can we get a list of all people who receive an email after sending a message to a distribution group?

Unfortunately, using only the Get-DistributionGroupMember we won’t get such information.

This command returns only the objects directly in a group, without nesting.

In this case, we have to use PowerShell commands for Active Directory available.

To do this run EMS console and import the Active Directory module command as follows:

import-module ActiveDirectory

Continue reading

Print Friendly

Microsoft Exchange get sent emails list – messagetrackinglog

emailRecently we wrote about how to find all the all recipients of the email:

Exchange MessageTrackingLogs get recipients list



Now we will present a powershell script that will help us generate statistics of sent emails.


However, we are not interested in the amount of all outgoing e-mails, their size, but we will focus on emails sent outside of our Exchange organization and get information about the addresses from which they were sent, with which the subject, how many of these emails and how many recipients receive those emails.

This script allows you to obtain information about the senders e-mail addresses that send many messages out.
This script is based on checking the Transport Logs located on Exchange servers with the Hub Transport roles.

After receiving the results of the script you can use the script in the previous post and find out to whom the message was sent, then you will get list of all recipients of this email.


Below we explain how this script work.:

First script part conatins:

  • powershell object definitions
  • paths to output files with emails statistic
  • settings to send email with alert to admin
  • $MAX_Recipients – number of recipients which define when to generate alert sent by email


Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
Set-AdServerSettings -ViewEntireForest $True

Function New-Array {,$args}

$Report = New-Array
$Report_SMTP = New-Array
$Rep_sum = New-Array
$Rep_SMTP_sum = New-Array

$data = $($((get-date).adddays(-1)).ToString('yyyy.MM.dd'))

#paths to output files
$Out_Rep_file = "d:\Scripts\Logs\Stats\msg_stat_out_$data.csv"
$Out_Rep_sum_file = "d:\Scripts\Logs\Stats\msg_stat_out_sum_$data.csv"

#files with emails with smtp traffic
$Out_Rep_SMTP_file = "d:\Scripts\Logs\Stats\msg_stat_smtp_out_$data.csv"
$Out_Rep_SMTP_sum_file = "d:\Scripts\Logs\Stats\msg_stat_smtp_out_sum_$data.csv"
#file with report attached to email (emails recipients grater than $MAX_Recipients)
$Email_HTML_File = "d:\Scripts\Logs\Stats\Report_outgoing_emails_$data.htm"

#settings for email with report
$mail_from = ""
$mail_to = ""
$mail_smtp_host = "smtpserver.domain.local"
$mail_subject = "Report outgoing emails $data"

#variable that defines the threshold for recipients to write to email report
$MAX_Recipients = 100

Continue reading

Print Friendly

Exchange Server 2010 create dynamic distribution group from security group members


When you have Active Directory Security Group which add permissions to some share or other resources, sometimes you need to send email to all group members to inform about some changes.

You can choose all users from Security Group but what if this group has more than 100 users.

You can create Exchange Dynamic Distribution Group.

When you want to create Exchange Dynamic Distribution Group, and add all members of security group to this dynamic group, it’s not so easy.

You can’t do this using Exchange Management Console.
Because when you want to create dynamic distribution group from Exchange Management Console you can choose Users with Exchange Mailboxes

Continue reading

Print Friendly

Exchange Server 2010 mass export mailboxes to pst file

Last time we wrote how to export mailbox from Exchange 2010 to pst file and import items from pst file to Exchange 2010 mailbox.

Exchange 2010 export import mailboxes

Now we will explain how to export few mailboxes at once from Exchange 2010.

When you want to export few mailboxes at once to .pst files you have to get aliases of those mailboxes and then run New-MailboxExportRequest in ForEach loop.

Below we present few examples how to export mailboxes with specified conditions:

To export mailboxes from specified mailbox database use:

ForEach ($mbx in (Get-Mailbox -Database DatabaseName)) {
 New-MailboxExportRequest -Mailbox $mbx -FilePath "\\server\share_pst\${$mbx.Alias).pst" 

Continue reading

Print Friendly

Exchange 2010 last logon time to mailbox


Sometimes we need to find when user logged to mailbox for the last time.

To achieve this we need to use  Get-MailboxStatistics CMDlet

Below command will display LastLogonTime for mailbox JSmith:

Get-MailboxStatistics JSmith | select DisplayName, LastLogonTime


If we are using shared mailboxes we also should display user account which were used to log to mailbox.
This command will display mailbox name, LastLogonTime and user account used to logon:

Get-MailboxStatistics JSmith | select DisplayName, LastLogonTime, LastLoggedOnUserAccount


When we want to get logon time information for all mailboxes in database or in mailbox server MX01, we need to use Get-Mailbox CMDlet, and pipe result to Get-MailboxStatistics

Continue reading

Print Friendly

Exchange Server scripts repository resources


If you write scripts for you Exchange Server environment, you can be interested in Microsoft  Scripts Repository.

On Microsoft websites you can find many scripts for Exchange environment, which are written in VBS, Powershell, SQL, JavaScript and others.

Those scripts are divided for Exchange Server versions 2003, 2007, 2010.

Links to Exchange Scripts repository :

Microsoft Exchange Script Center

Technet Gallery Exchange Scripts



Print Friendly

Exchange 2010 Database size growing problem


When you have Microsoft Exchange 2010 environment you can have problem with Exchange database size growing.

This is common problem and mostly caused by Exchange 2010 mailbox dumpster.

But if you have problem with mailbox databases backup, then all items deleted by users and all deleted mailboxes will not be purged until backup will end successful.

If you check size of all mailboxes in Exchange 2010 mailbox database, the sum of mailboxes can be less than mailbox database size. Yes we know that mailbox database has AvailableNewMailboxSpace but you can check that sum of mailboxes size and size of mailbox database white space can be also less then size of .edb file.

You can find informations how to reduce Exchange database size by moving all mailboxes from database to new one, or to dismount database and use Eseutil to defragment mailbox database. You can also find all disconnected mailboxes in database and purge them.

We wrote about this in post:
Microsoft Exchange 2010 how to reduce the size of the database

You can find information on Microsoft Support Website An Exchange Server 2010 database store grows unexpectedly large that if you want to stop mailbox database unexpected growth you need to install Rollup 1 for Microsoft Exchange 2010 SP2.

Unexpected growth of Exchange 2010 mailbox database can be caused by using:

  • using jurnaling mailbox in Exchange 2010 environment
  • using a third-party email message archival system

This issue can occur if the Microsoft Exchange Information Store service does not remove the deleted messages from the database.

Unfortunatelly when you use third-party email message archival system like Symantec Enterprise Vault, all emails moved to archive are deleted from user mailbox but they still remain in dumpster.

When you install Rollup 1 for Exchange 2010 SP2 it will probably fix this problem but it will fix only problem with new data added to archive but not clean the dirty pages or whitespace from preexisisting databases. 

More information you can find on Symantec Support Website:
Archiving of an Exchange 2010 database does not generate the expected amount of re-usable whitespace


How to resolve Exchange 2010 database growth:


When you apply Rollup 1 for Exchange 2010 SP2 you need to check few mailbox databases properties to make sure that all retentions and Quotas are configured properly.

To check Exchange 2010 mailbox database items retention like Mailbox, Deleted items and EventHistoryRetention you need to run Exchange Mangement Shell (EMS) with command:

Continue reading

Print Friendly

Exchange 2010 get version number, build number


With every release of Rollup Update for Microsoft Exchange we are trying to get to know what Microsoft Exchange version we use.

When you check Microsoft Support Website Determine Exchange Version you will find out that there are two ways to get Microsoft Exchange version and build version.


Get Exchange 2007, 2010 version using Exchange Management Console:

  1. Start the Microsoft Exchange Management console.
  2. In the navigation pane, expand the Server Configuration objects until you locate the server object, and then select the server object.
  3. On the right side, notice the Exchange version number.



Get Exchange 2007, 2010 version using Exchange Management Shell command:

  1. Start the Microsoft Exchange Management shell.
  2. Run the following command at the command line:


Get-ExchangeServer | select name, AdminDisplayVersion, ExchangeVersion



Unfortunatelly using both of those methods we won’t get correct Exchange 2010, 2007 version.



Continue reading

Print Friendly