Deploying an Exchange 2013 Hybrid Lab Environment in Windows Azure (Part 13)

If you would like to read the other parts in this article series please go to:


In part 12 of this article series revolving around what the Windows Azure service is all about as well as how you deploy an Exchange hybrid deployment in Windows Azure, we talked about how to create a database availability group (DAG) on a virtual machine in Windows Azure. Then we created a DAG and added the two Exchange 2013 multi-role servers to the DAG. Lastly, we created a public folder mailbox and the primary hierarchy.

In this part 13, we will continue where we left off in part 12.

Let’s get going…

Populating the Lab Environment with Test Users

So what fun is a lab environment with no user objects? Pretty boring right? So let us get some user objects created. When you wish to populate the Active Directory with, let us say, a couple of hundred accounts, you of course turn to a scripted method. There are many PowerShell scripts to be found on the Internet that can be used for this purpose. If you want to name the users with real names, you can even turn to a website that can generate them for you and provide you with a CSV file. Yes neat indeed.

Personally, I have used this batch file (rename from .txt to .bat) for ages as it fits my needs for most lab environments I am building. Yes, you heard that right, I use a batch file (which I am too busy/lazy to update to a PowerShell script), which executes the “DSAdd” command to create a few OU’s and a good portion of test users spread across these OUs.

If you are using my batch file, remember to do a search and replace of the forest and domain name, which in this version is set to “”.

Figure 1:
Batch file with test user information

When ready open a command prompt and execute the batch file as shown in Figure 2.

Figure 2: Running the batch file to create test users and OUs

When the batch file has been run in your lab environment, you will see the following in your Active Directory forest.

Figure 3:
New OUs and test users in Active Directory

As you may have noticed, the .bat file does not mailbox-enable the users. This is on purpose, as I sometimes do not want to mailbox-enable them right away or only want to mailbox-enable a subset of them.

GetADUser | EnableMailbox

Figure 4: Mailbox-Enabling the Active Directory Test Users

Since this is a lab environment, I do not mind user accounts such as the “Guest” and “krbtgt” accounts being mailbox-enabled. If this is a problem in your environment, you can use the “-filter” parameter to exclude specific user accounts.

Figure 5: Test Users has been mailbox enabled

Lastly, you may wish to populate the mailboxes with test data. For this, you can either add all mailboxes to a distribution group and send a few emails to the distribution group or perhaps go down the more fancy route and use this or this method created by Exchange MVP’s Mike Pfeiffer and Paul Cunningham respectively.

Creating a Few Test Public Folders in Exchange 2013

The last activity in this article revolves around creating a few test public folders and send a few emails to each in order to populate them with test data. I will create a public folder hierarchy that reflects the Active Directory OUs we created earlier on in this article.

Since I will only create seven root public folders where two of them will have one sub folder, I will just use the ECP for this. To do so, launch the ECP and click “public folders” in the left pane. Under “public folder”, click the “+” (plus) icon to launch the new public folder wizard.

Figure 6:
Public folders in exchange admin center (ECP)

Enter a name and click “save”.

Figure 7: Creating a new public folder

Figure 8: Public folders listed in the Exchange Admin Center (EAC)

With the public folders created, we need to mail enable them. To do so, select the public folder and click “Enable” under “Mail settings” in the right pane.

Figure 9: Mail-enabling public folders

When clicking “Enable” you will receive the warning in Figure 10. Click “yes”.

Figure 10: Mail-enabling public folder warning

With the public folders created, all you now have to do is to log on to a mailbox and send a few test messages to the public folders. If you want more realistic test data, a method is to make this data available in a PST file and then open the PST file in an Outlook client that also have access to the public folder hierarchy we created above. You can then simply drag and drop the data from the PST file to the respective public folders.

I am not aware of a scripted method to populate public folders with test data.

This concludes part 13 of this multi-part article in which I provide you with an explanation of what Windows Azure is and how you configure an Exchange 2013 hybrid lab environment in Windows Azure.

If you would like to read the other parts in this article series please go to:

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top