Testing ActiveSync (EAS) using emulation on AVD Manager.

Recently I was reading about ActiveSync and policies for Exchange 2013, and I was wondering how to test it in my lab environment. Just one search away I found that great post:


After installing JDK and AVD Manager I was able to emulate Android device in my lab.

I just would like to highlight some things over here, when going to that website:


DO NOT CLICK on the “Download Android Studio” button:


That will download around 1,1GB on data, and installation would take another 3 GB. Later it will need some additional space for creating emulated android device. So  overall it took  around 4GB of space and was still telling me about too less space 🙂

So the link you would need to click is a bit further:

avd_2Firstly, we need to install Java SDK (but different from the version we would need to install full version of Android Studio), here is the link I used:


Names of downloaded files should be similar to those:

avd_3After successful installation of AVD Manager we need to go with other steps that Paul described (first link in this post). And here is the final effect:


A test message that has been send out using my private Sony Xperia L, and was received by other test user on a emulated Android device!

Isn’t that cool!!! 😀


Now we can test all of the EAS policies not harming our private device.

SingleItemRecovery in Exchange 2013, recovering emails from Purges folder with Search-Mailbox cmdlet.

Sometimes I got a call from a user claiming that some data from his mailbox has been removed by an invisible force.

Usually I am able to find lost folder/files under other sub folder (Well! Would you look at that!)

User then tries to tell he/she didn’t do anything. IT WAS OUTLOOK!

tea_thinkerYup, definitely Outlook…

There are moments when items indeed haven’t been moved but deleted. What options do we have? Here I would like to highlight functionality called “Single Item Recovery”. To enable it we can use:

Set-Mailbox <mailbox_name> -SingleItemRecoveryEnabled $true


What happens when user deletes data from his mailbox? Those go to “Deleted items” on the first place, later, if item has been removed from there as well it goes to “Recover Deleted Items”, that allows user to recover items from Outlook doing those 4 steps:


When user removed the elements from above place, items go to another folder that is not visible for user – called “Purges”.

There is a great article about that work-flow on technet:


Below picture comes from there as well:

single_item_recovery_3On testuser1 I have removed everything from “recover deleted items” but one item – just to let you see how it would be visible. To get number of items that are sits in “Purges” we can use below command:

Get-MailboxFolderStatistics -Identity “<mailbox_name>” -FolderScope RecoverableItems -IncludeAnalysis | ft

single_item_recovery_4So we clearly see here that there is something we can recover, there is also one item in “Deletions” and that folder shows us items in “Recover Deleted Items” option in Outlook.

Now how to get those elements from there? We can use Search-mailbox query for that:

Search-Mailbox <source_mailbox_name> -TargetMailbox <destination_mailbox_name> -TargetFolder ODZYSK3 -SearchDumpsterOnly

With SearchDumpsterOnly we specify scope of our search only for “Deletions” and “Purges” – it is not searching in “Deleted Items” folder as you would think of.


single_item_recovery_6Interesting thing is, if any of the messages that have been recovered has had already been read – here in that example where we haven’t had read any of them – that status would be remembered, and that status would be also reflected in the target mailbox after recovery. So for example if 4 messages that were in purges were read, the unread counter on the Purges folder in target mailbox will show us 3135.

What we can do now is to export that to PST and import to the proper mailbox 🙂

We need to do it that way as we cannot give name of the target mailbox same as the source mailbox in Search-Mailbox cmdlet.

So hey! We have recovered the deleted elements! We didn’t let to surprise ourselves, we were prepared! Just like Ross 😀


Circular logging and adding new (second) database copy in Exchange 2013 DAG

Database “<DB_NAME>” has circular logging enabled. It is not possible to add or remove database copies while circular
logging is enabled. Please disable circular logging before adding or removing mailbox database copies. – this kind of error you might receive when trying to run command: Add-MailboxDatabaseCopy

Adding new (second) mailbox database copy in DAG enforces on us turning off JET circular logging on the database, of course we need to do it only when creating the first copy.

When you try to do it without it you might see below error:


Disabling DB copy can be made using command:

Set-MailboxDatabase wrodb02 -CircularLoggingEnabled $false

So after that we are getting below message with a reminder abut dismounting database:

circular_logging_2But let’s say what will happen if we won’t believe in that and we will try to add DB copy without re-mounting the database?

We may get:

The seeding operation failed. Error: An error occurred while performing the seed operation. Error: Failed to open a
log truncation context to source server ‘<SERVER_NAME>’. Hresult: 0xc7ff07db. Error: Failed to open a log
truncation context because ESE-level circular logging is enabled. Please dismount and then mount the database.

circular_logging_3Ok, so now I definitely see that this cannot be done this way, I knew that, but now we’ve tested it.

It ain’t that I don’t understand what they give in books.

circular_logging_9I just want to try what would happen! 😉

However, after re-mounting the DB, and trying to add DB copy we got another error though:

The database “WRODB02” already has a copy hosted on server “<SERVER_NAME>”. Choose a different server.


Weird, so it looks like the database is already mounted, checking that…and yeah, it is!:

circular_logging_5Ok! So let’s resume the database copy:


Hell yeah! So actually I was thinking that despite of warning it worked, no need to re-mount the database. Buuut.. my joy was not lasting long, after few minute I got “FailedAndSuspended” status. I thought that it was somehow fault of “ContentIndexState” was “Suspended”, but repairing that didn’t help:

circular_logging_7So..I ended up with full update of the database from the other server.

After the database is already in DAG, there is no need for dismounting it when switching On/Off from circular logging, that goes smoothly without need of re-mounting it:


Creating DAG on Windows Server 2012 R2 and Exchange 2013 SP1 without Administrative Access Point? YES!

So we know that creation of DAG was always connected to creating a DAG computer object in AD, when using Windows Server 2012 or 2013 R2 pre-staging of  the CNO in AD is required.

So we use one additional computer account, and an IP address. However, Is it possible to create a DAG not having those at all? The answer is – YES and here is the great article telling us how to do it:

Cluster Administrative Access Point and Database Availability Group


Dynamic memory for Exchange 2013 – why not supported?

Recommendation why to not to use dynamic disks on crucial applications might be explained quite easily – since system is saving new stuff on the disk, each save operation equals disk expansion – which takes valuable time. But what is so special with Exchange and dynamic memory which usage is also not recommended by Microsoft?

Bhargav Shukla and Paul Robichaux in their book “Core Solutions of Microsoft Exchange Server 2013 (MCSE)” explain why dynamic memory might be a problem for Exchange 2013, here is the piece that is very interesting:

“Exchange 2013 code is optimized to strike a balance between the efficient use of memory and reducing the I/O footprint. To achieve these efficiencies, Exchange relies on a calculated cache for each database being hosted on the server, as well as the memory reserved for Exchange subsystems. When dynamic memory is in use, this can result in incorrect memory calculations and it can cause Exchange to start with less memory than is available.”

So that makes sense, and here is the place where RAM allocation is shown in a really nice way:


Also interesting thing is that oversubscription of processor is supported, the recommended ratio is 1:1 (of course ;]), but supported is 2:1, so that would mean that for ex. 1 physical CPU of an ESX host, can be shared only between two machines (Exchange or any other).

Capacity planning for Exchange

As I am preparing now for MCSE in Exchange 2013 and reviewing book for 70-341 exam [Core Solutions of Microsoft Exchange Server 2013 (MCSE)].

Just going through chapter about capacity planning and found some useful links in relation to that, thought worth sharing:

How to Calculate Your Disk I/O Requirements (Exchange 2003)


Exchange 2013 Server Role Requirements Calculator v7.6


Disk Performance Testing with JetStress 2013


Exchange 2010 Sizing Cheat Sheet


Exchange 2013 Mailbox Role Counters (Advanced)


Ask the Perf Guy: Sizing Exchange 2013 Deployments


Virtualization of Exchange 2013