Retention Tags and Policies – a quick how to

Poster - Out of the Past (1947)_03

Retention tags determine the actions of retention policies and therefore must be created before their corresponding policies

From TechNet:

Retention tags are used to apply retention settings to folders and individual items such as messages, notes, and contacts. These settings specify how long a message remains in the mailbox and the action to take when the message reaches the specified retention age. When a message reaches its retention age, it’s moved to the archive mailbox, deleted, or flagged for user attention.”

[…]

Using the EMC…here’s a quick example of how to make a tag and apply it to a policy.

(BTW, our example assumes that users have been granted the “my retention policies” role assignment as described in this TechNet article).

Let’s say a user who has recently been assigned an archive mailbox wants a retention policy that will move mail items to their online archive after 15 days.

From within the EMC, go to Organization Configuration  –> Mailbox

One

From the Action section on the right, choose New Retention Policy Tag

Two

  • In the  Tag Name field, enter the name of the Tag (it should describe the tag’s time period, for ex. “15 Days to Archive””
  • In the Tag Type field, use the drop-down to set what kind of tag this is (i.e., applied to a specific folder only or available to be used on any folder within a user’s mailbox). In our example, we’re using the Personal Tag type
  • In the Age limit field, choose the amount of time – in days – that elapse before the tag/policy goes into action.  In our example, it will be 15 days
  • In the Action to take when the age limit is reached field, use the drop-down to choose what action the tag/policy will take when the age limit has been reached.
  • Note the Disable this tag button – this allows you to deactivate a tag without deleting it (for troubleshooting purposes, for example)
  • The comments field is optional

Three

Click New to proceed.

Four

Click Finish to complete making the tag.

Next, you’ll apply this tag to a policy.

Again, from Organization –> Mailbox…

Five

Choose New Retention Policy from the Actions menu on the right…

Six

  • In the Name field, enter your policy’s name (it should match that of the tag for simplicity)
  • In the Add tags to the retention policy field, use the Add button to select from the list of available tags

Seven

Eight

Click OK

Nine

Click Next

Ten

Here, you’re presented with the option to apply this policy to a list of mailboxes. We’re not doing this in our example (since we’re making a policy the user can apply her or his self to an Outlook folder) so we can ignore this setting and click Next.

Eleven

Click New

Twelve

Click Finish to complete making the policy

Thirteen

If you look closely, you’ll notice that the Exchange Management Console displays the PowerShell cmdlet syntax used to perform actions via the GUI.

We can do all of the above within the Exchange Management Shell .

Making the retention tag:

New-RetentionPolicyTag -Name ’15 Days to Archive’ -Type ‘Personal’ -Comment ” -AgeLimitForRetention ‘15.00:00:00’ -RetentionAction ‘MoveToArchive’ -RetentionEnabled $true

And then, tying that tag to a retention policy:

New-RetentionPolicy -Name ’15 Days to Archive’ -RetentionPolicyTagLinks ’15 Days to Archive’

 

Amazon Web Services: Building an Exchange Test Environment

2001moon_shutle-control-panel

Amazon provides a cloud computing platform named Amazon Web Services (AWS).

Although AWS is primarily targeted towards enterprise-level customers such as Expedia, who use it to host their extensive web server farms and cloud-based data centers, there’s also an affordable tier called Elastic Computing 2 (EC2). Amazon also provides rapidly deployable test-drive environments for several Microsoft server products, including Exchange. No doubt these are useful for a variety of testing scenarios but unfortunately don’t give you an opportunity to build and configure an entire environment from scratch.  For that, you’ll need EC2.

Using EC2, it’s possible to build a modest-sized Exchange test environment at a reasonable cost (as of this writing, a four server environment cost approx. $40 to  $50 per month to keep online.  Note that pricing is flexible and dependent on virtual machine specs and uptime, among other factors).

You’ll need an Amazon account to get started (yes, the same account you use for shopping).

Once you’ve logged into the EC2 dashboard, you can create a virtual machine instance:

Create Instance

You’ll be presented with a list of Amazon Machine Images including Linux and Windows images.

Choose and Amazon Machine Image

By scrolling down, you’ll see a list of Windows Server options.  For building an Exchange server environment, I’ve typically used Windows Server 2008 Base 64-bit

Windows Server 2008 Base

The best option for making a low-cost testing platform is the t2.micro machine type which is included in the free tier.  Although the servers in this tier are indeed free, there are associated costs for bandwidth usage, CPU time and so on. See the AWS EC2 pricing guide for full information.

Choose an instance type-review and launch

In this example, we’re accepting the default machine configuration (i.e., no expansion of the standard RAM and hard drive space options) so we can choose the “Review and Launch” button at the bottom of the page to proceed.

Choose an instance type-review and launch

Recently, Amazon introduced solid state drives (SSD) as an option for their virtual instances.  In my experience, the SSD drives are an excellent choice for creating reasonably performing machines (especially in the free tier where the machines are not particularly robust – 30 GB of hard drive space and low RAM configs).

Boot from General Purpose SSD

Amazon Web Service instances are secured with public key data.  Part of the process of creating a machine is making a key pair (or selecting an already existing one)

 

choose a key pair

Once you’ve downloaded a key pair the instance will launch

Initiating Launch

There are several other tasks required to build your Exchange test environment using AWS. The biggies include:

1.)    Downloading trial copies of Exchange 2010 or Exchange 2013 from Microsoft.com

2.)    Creating a domain controller and configuring its DNS to use the DC’s external IP as the lookup host (about which, see below)

3.)    Configuring the AWS security group your machines are part of to allow the public IP addresses of your instances inbound access to all member servers.  This is a critical step for creating an Active Directory and Exchange environment since, by default, the EC2 instances use DHCP for IP addressing.  Their public addresses however, are fixed and so, these can be used to work around this limitation as per the image shown below, which diagrams the topology for a simple, two node DAG cluster Exchange set-up:

AWS domain topology

There’s quite a bit more to say but this post shows the basics – at least as I’ve experienced and worked out.  With AWS it’s possible to make – for a fairly low cost – a sandbox for safely practicing on a working Exchange environment.

Get Mailbox and Mailbox Database Stats Using Powershell

peter o'toole - lawrence of arabia 1962

While it’s possible to gather some information about mailbox database contents using the Exchange Management console (by, for example, using the filtration options found under Recipient Configuration) more comprehensive information can found by using PowerShell.

From within the Exchange Management Shell, you can view the mailbox databases in your org by using the following command:

Get-MailboxDatabase

And, you can view the mailboxes within a particular database by combining shell commands:

Get-MailboxDatabase “Your Mailbox Database name” | Get-Mailbox

We can further modify this syntax to create reports; for example:

Get-MailboxDatabase “Your Mailbox Database name” | Get-MailboxStatistics | Sort totalitemsize -desc | ft displayname, totalitemsize, itemcount

Also,  we can examine the stats for a specific mailbox in detail:

Get-MailboxStatistics -identity “Username” | fl