All posts tagged Microsoft Exchange

Second in our series of Guest posts by Exchange MVP’s is Jaap Wesselius, exploring the reporting capabilities on historical SMTP queues. Reporting is a perennial issue for Exchange admins and I’m delighted for Jaap to demystify it so well.

Jaap Wesselius is an independent consultant from The Netherlands focusing on (Microsoft) Business Productivity solutions. Prior to becoming an independent consultant, Jaap worked for 8 years for Microsoft Services in The Netherlands, specializing in Exchange Server. Jaap has a Bsc in Applied Physics & Computer Science, is an MCSE, MCITP and MCT, and has consistently been awarded the Microsoft MVP Award (Exchange Server, fifth year now) for his contributions to the Dutch Exchange community


Queue reporting

 

On your Exchange 2010 server there are not a lot of possibilities to have a historical look at the SMTP queues. Of course you can use the Queue Viewer in the Exchange Management Console but this is an instant view of the SMTP queues. Personally I like the Exchange Management Shell cmdlet “Get-Queue” a bit more because you can select all servers with only one command:

Get-TransportServer | Get-Queue

This will give you an overview of all SMTP Queues on all Hub Transport Servers.

With the Shell you also have the option to select only the properties you want to see using the “Select” operator. For example, to see only the Identity, Status, Number of messages and the domain of the SMTP queues you can use the following command:

Get-Queue | Select Identity,Status,MessageCount,NextHopDomain

Combine this with the previous command and you’ll get a nice overview of your SMTP queues:

Get-TransportServer | Get-Queue | Select Identity,Status,MessageCount,NextHopDomain

This output is shown on the console, but it would be nice if it can be stored on hard disk for logging purposes. Powershell has a command for this: “ConvertTo-HTML” that can be used to convert console output to HTML formatted output. This HTML output is still shown on the console, but can be saved to disk using the “Out-File” command.

The previous command to get the Queue information would now look like:

Get-TransportServer | Get-Queue | Select Identity,DeliveryType,Status,MessageCount,NextHopDomain, LastRetryTime,NextRetryTime | ConvertTo-HTML | Out-File C:\Temp\QueueInfo.html

Although useful, the output is really awful to look at:

To work around the ugly lay-out we have to change settings for all the cells in the table that’s shown in this overview. The layout can include the background colour, the font type, size and colour, the alignment etc.

To get a nicer looking HTML file, gather some more information and to create a unique filename the Powershell string that was used earlier will be converted into a small Powershell script.

To accomplish this we have to work with HTML Styles that define all these settings, and this is style is stored in a variable called $BodyStyle:

$BodyStyle = “<style>”

$BodyStyle = $BodyStyle + “BODY{background-color:peachpuff;}”

$BodyStyle = $BodyStyle + “TABLE{border-width: 1px;border-style: solid;
border-color: black;border-collapse: collapse;}”

$BodyStyle = $BodyStyle + “TH{border-width: 1px;padding: 0px;
border-style: solid;border-color: black;background-color:thistle}”

$BodyStyle = $BodyStyle + “TD{border-width: 1px;padding: 0px;
border-style: solid;border-color: black;background-color:PaleGoldenrod}”

$BodyStyle = $BodyStyle + “</style>”

The variable $BodyStyle is then added to our previous command to get a better lay-out of the HTML output:

Get-TransportServer | Get-Queue | Select Identity,DeliveryType,Status,MessageCount,NextHopDomain,LastRetryTime, NextRetryTime | ConvertTo-Html -head $BodyStyle | Out-File C:\Temp\QueueInfo.html

When the above is stored in a Powershell script, for example c:\temp\queue.ps1, and it is run from an Exchange Management Shell command prompt we get the following output:

This is a much better view than the original one. But instead of storing a file on disk it is also possible to send the output to somebody. To do this we have to create a new e-mail message(called $Msg) and parse the output of the previous command into the e-mail message, so the following code is added to our Queue information Powershell script:

$Msg = new-object system.net.mail.MailMessage

$msg.IsBodyHtml = $True

$msg.Body = $Queue

$msg.Subject = “Hub Transport Queue Information”

$msg.To.add(“postmaster@wesselius.info”)

$msg.To.add(“jaap@wesselius.info”)

$msg.From = “postmaster@wesselius.info”

$SmtpClient = new-object system.net.mail.smtpClient

$smtpclient.Host = ‘<your SMTP relay server>’

$smtpclient.Send($msg)

Note: the $Queue variabele contains the data that was collected using the Get-Queue command. The $Queue variable is populated as follows (this has to be changed in our script as well):

$Queue = Get-TransportServer | Get-Queue | Select Identity,DeliveryType,Status,MessageCount,NextHopDomain,LastRetryTime, NextRetryTime | ConvertTo-Html -head $BodyStyle

When the new script is run the information is collected, formatted and sent using SMTP to a recipient. After some time the new message arrives in our inbox:

The last part is to schedule our Powershell script on a regular basis. It is not possible to schedule Powershell scripts from the Windows Task Scheduler, so the Powershell script in included in a batch file. Create a batch file using Notepad called “QueueInfo.cmd” and store the following in this file:

Powershell.exe -PSConsoleFile “C:\Program Files\Microsoft\Exchange Server\v14\bin\exshell.psc1″ -command “. ‘C:\Temp\queue.ps1′”

The QueueInfo.cmd file can now be used in the Windows Task Scheduler. This way we get Queue information on a regular basis, right into the Inbox!

Add your comment (4)

Cloud Strategist
Mimecast

We often get asked where people can find really good technical content on Microsoft Exchange, and one of the very best is the Exchange Team Blog, and particularly the Robert’s  Rules series.

Robert Gillies is a Microsoft Certified Master and Microsoft Certified Architect, working in the Public sector space for Microsoft. Dealing with Government, Robert architects and oversees larger projects than the average architect. One of the other things Robert does is blog about Exchange, specifically designing, building and running Exchange 2010.

In a recent post, Robert discusses a rather interesting approach to designing Exchange; specifically, keep the design as simple as possible for as long as possible and take the opportunity to challenge additional complexity at every turn. What does this mean for you and I?

In a previous two part series titled Give your SAN to the SQL team parts one and two, we discussed using SATA based disks as the primary storage medium for Exchange servers, as opposed to Expensive Tier 1 SAN storage. Robert takes this approach one step further, advocating the use of Multi Role Exchange Servers – where CAS, HUB and Mailbox roles are deployed onto the same hardware – along with SATA disks.

Robert discusses and, more importantly, advocates a number of technologies along with their context. When we think of designing Exchange and knowing what we should or should not be doing, this is critical. In this post, Robert covers a number of areas, including rack space, storage, when virtualisation makes sense, how to save hardware, all from the experience he has as an architect in this space, which is invaluable to those desigining, operating and running exchange environments.

Challenging complexity is what this blog is all about. Challenging complexity in Exchange designs and keeping things simple for as long as possible is what Robert is advocating, and for that we feel that Robert’s series of posts deserve to be called out.

 

Add your comment (2)

Enterprise Consultant
Mimecast

Article Tags

,

In some ways, I’m quite surprised to hear IT managers and CIOs tell me they’re still running Exchange 2003.  But perhaps I shouldn’t be.  After all, more than a third of the Exchange customer base is flying this old bird.

Exchange 2000 and 2003 were big steps up from Exchange 5.5.  For most the upgrade meant new hardware, OS licenses and OS server version. Around that time I was involved in many infrastructure projects and noticed a definite buzz around the IT departments, like an excitement to be getting Exchange upgraded at last.

The leap from Exchange 2003, to Exchange 2007 or even 2010 is similarly exciting; but I’m also seeing a degree of caution this time too. Maybe it’s because the addition of 64bit hardware means another infrastructure upgrade, or maybe it’s something else?

I’m talking to CIOs almost daily, and the large percentage that have active Exchange migration projects generally say the same thing. The story usually goes like this:

Years ago when I had our first Microsoft Mail server and a windows 95 network – NT if I was lucky – everything was simple, relatively speaking. The mail server was attached to a modem which used to dial-up to the ISP and we’d send and receive our email in big batches. When ISDN arrived we really thought we were living in the space age.

Our early mail server, even up to Exchange 5.5, simply dialed up to the Internet and downloaded our email, the only problems being usually related to large attachments. Life was good, users didn’t complain, most of them didn’t really know much about this new email tool, let alone the Internet. My biggest headache was running out of paper rolls for the fax machine.

Somewhere in the middle of the 90′s I remember things getting a little more complicated. My staff started to complain that they were being sent emails about degree qualifications or heraldic titles, things they hadn’t asked for. Not long after that the first mass-mailing email worms made an appearance. Of course then my server room then started to fill up; a firewall and an anti-spam solution here, and anti-virus solution there, ISDN turned into an always on broadband connection. The millennium bug kept me awake for months.

The addition of those point solutions continued, and still continues today. I’ve added an email encryption box, an archive with a load of disk space attached, a DLP solution, a footer and disclaimer box, a RAS box (remember those?) which is now a VPN box, a BES server and now I’m being told I need to make all of this resilient to the same extent as dial tone.

And now you want me to strip out and upgrade the one platform all of this sprawling technology supports? Phew!!

I think that this buildup of point solutions in the email management environment has created a mountain of technology that sits at the heart of the concern our CIOs have today. Upgrading any core application of service inside a business is going to require some careful planning and consideration, and there are clear benefits of upgrade Exchange to the latest version. Many IT departments are passing on those benefits to the staff right now, but I think what slows down the process is all of this peripheral complexity.

Finding a way not to fear that complexity, or even better doing away with it all together, is going to make this Exchange upgrade, and the next few that are coming down the pipe, a lot more palatable. Don’t hold back, give your users what they want and modernize – if this means stripping out some of those bits of tin in the network, then now is as good a time as any.

Add your comment (0)

CISSP, CCSK
Mimecast, North America.

October 2003; seven years and a couple of months ago. A long time in the life of many things, especially technology.

There are several sites dotted around the web that list the major events that occurred in the year 2003, I’ll let you discover those for yourself, but a few key moments you might remember were:

  • Apple launched iTunes
  • Concord made its last commercial flight
  • 50 million people on the East Coast lose power

Of course October 2003 is also when Microsoft launched Exchange 2003, the fifth version of the popular Microsoft Exchange Server. When you think about that in relation to the other events I’ve mentioned it seems like a long time ago doesn’t it?

Yet even today some organisations are still holding onto Exchange 2003 with no solid plans to upgrade. I’ve been thinking about these issues a lot since I helped author a whitepaper on how to migrate Exchange successfully (registration required).

Are the benefits of Exchange 2007 or Exchange 2010 clear enough? Of course some organizations are reliant on custom applications that might not support an upgrade of Microsoft Exchange (I thought we’d all learnt that lesson with Exchange 5.5?) and if that is the case, you have my sympathies.

For the rest of you who don’t have an excuse, I often find the problem lies in a combination of cost and complexity.

Or, more accurately complexity and cost, as the cost is a product of the complexity. It’s a factor of corporate caution that puts a huge amount of effort and protection into these projects to make sure every eventuality is covered and nothing goes wrong (read downtime).

Why the complexity? Well it’s organic. We’ve grown up with the environment, we’ve added solutions and services on a regular basis, and now we’re standing at the foot of a towering mountain of IT solutions. Upgrading a central component of all that technology instantly becomes a much larger project than we first anticipated, probably requiring more resources and more budget than our first estimate.

That’s why 25% of your peers said that you don’t have the resources to perform the upgrade- they’re stuck in a sea of complexity- IT getting the blame for everything whereas it’s the business not giving IT budget. (The full survey results and analysis can be found here- registration required)

But they’re now two versions of Exchange Server behind with mainstream support already at an end, and extended support due to end in 2014 – people are going to need to find a way to tackle this problem soon.

Add your comment (0)

CISSP, CCSK
Mimecast, North America.

Article Tags

, , ,

We ran a survey of 590 IT Professionals at Exchange Connections 2010 in Las Vegas last month, from organizations of all sizes and sectors, asking them about their Microsoft Exchange Infrastructure and their plans to upgrade to the Microsoft Exchange 2010.

Exchange 2010 brings important advances to the email infrastructure and many organizations are looking forward to upgrading as soon as they can. Even with these new features the results of our survey show that overall email management remains a complex and resource intensive task and that could be holding up one of the most significant Exchange releases in a number of years.

Just 20% of IT Administrators surveyed have adopted Exchange 2010 to date- is that a really low number considering how long it has been released?

Although 51% are planning to upgrade to Exchange 2010 in the next 12 months, many people are still unsure what the real benefits will be. Just over 8% believe that its most valuable benefit will be simplified compliance.

From what I’ve seen of Exchange 2010, the rest of you are in for a pleasant surprise.

(The full survey results and analysis can be found here- registration required)

The results in more detail

Surprisingly spam and email security remain the biggest problem, even today when we largely think that spam is an old and well understood. As a result 50% of respondent organizations said they had at least two solutions for email, 20% said they had at least three. So are we really still dealing with the age-old problems?

The good news is that some 68% of you plan to upgrade to Exchange 2010 within the next two years, and around 51% within a year. That’s accelerated- about 13%- from our earlier Exchange Adoption report (registration required). However it looks like many people are worried about the resources required to achieve this.

We found that just over 25% of respondents said they didn’t have enough IT resources to tackle the migration.

The key question surely must be: have messaging architectures become too complex to adopt new technology with the resources available in house? This research certainly suggests things have become that way.

And in our day to day work  helping customers with Exchange, we often find that it’s the multitude of systems added to Exchange over the years, to solve single issues such as security or archiving, that create the complexity.  And the net result of all these additions is an architecture that is brittle, and is not resilient to change.  Administrators cannot be certain of the knock-on effects of one change to the rest of the systems, and are then faced with an impossible dilemma – upgrade at the potential cost of downtime or disruption, or stay put.   Their hands are tied by complexity.

Can you see why we’re obsessed with helping IT admins chase complexity out of their email systems?

Looking forward to Exchange 2010, we see that the most anticipated benefit of 2010 is the Enhanced Availability thanks to the new storage architecture of DAG’s etc. Yet this is in contrast to the 12% of respondents that told us that continuity was the most significant email challenge. Luckily those of you who had migrated agreed with us, the enhanced availability was the biggest bonus. I wonder why continuity is far down the list of proposed improvements yet top of realised improvements? One for another post I think.

So what next?

What are the ways of maximizing the investment in Exchange 2010?

  • Look for ways to simplify your messaging architecture to enable you to adopt new technologies faster, be more agile and deliver more value. Chase complexity out of the system- not introduce it.
  • Before migration is the time to get rid of any complexity that could cause downtime during a migration. Getting your mail architecture lean and mean before tackling the migration will reduce opportunities for disruption. For example Exchange MVP Nic Blank says: “Archive before you migrate”.
  • In the same vane- make email system integration a priority. Review your policies and procedures, take the opportunity of upgrading to Exchange 2010 to review more than just the application or OS. Bring everything together to reduce risk and dissolve complexity.
  • Consider leveraging the cloud for more than just storage. And the Cloud is not an all or nothing move either- there are ways to use Exchange 2010 on-premise, hosted or BPOS with Cloud services to extend its functionality and reduce cost- such as Continuity and Archive.

Add your comment (0)

CISSP, CCSK
Mimecast, North America.

Everyone has been waiting for an Exchange 2010 version of the popular Exchange 2007 Component Architecture poster. I’m pleased to let you know that the Exchange Server 2010 Architecture Poster is now available for download.

Here’s a preview:

Exchange Server 2010 Architecture poster preview

This poster helps you understand how the major components of Exchange 2010 work and serves as a quick reference guide and learning tool rolled into one!

It is available from the Microsoft Download Centre:  Exchange Server 2010 Architecture Poster (PDF).

Add your comment (0)

Yes that’s right, Exchange 2010 for a single user deployment.

I track all sorts of data that moves across Twitter and today one of my feeds showed me a sysadmin that was out in the field and busy deploying a full Microsoft Exchange 2010 server for one single user.

A groupware server for a single user?

Luckily he was able to merge the CAS, HUB and MB roles onto a single server, at least this installation did not waste too much additional tin.

After I had rolled my tongue back into my mouth I thought about it for a little while to see what reasons I could possibly think of that would lead me to the conclusion that a fully deployed MS Exchange server would be the right solution for a single user.

I have to say I came up with nothing.

For my money this was not the right way to go though I am sure this user will never understand what all the fuss about management of complex systems is, their mailbox will be able to grow to multi gigabytes easily and still be backed up onto tape with rapid restore times. Maybe they will deploy a DAG later on so they can remove the backups from the picture? Who knows.

Surely a single user would be far better off using BPOS or EHS or any one of the myriad of hosted Exchange systems out there?
Or simply purchasing Microsoft Outlook and using that as a standalone application. Ok, so maybe activesync would be nice, remote access and the like, but that simply draws me right back to a hosted Exchange platform!

That is assuming of course that this single user actually needed any of the groupware functionality that a system like Exchange provides. Groupware… Does one single user make a group?

I would be very interested to hear your views on this one as I am still thinking about what would motivate someone to request this type of install.

Add your comment (0)

Amazingly there are still many companies out there today who still manage to forget to close off their Exchange server’s native ability to provide a full open relay.

So just a quick note for you, a very easy way to make sure you aren’t an open relay is to run the following command from the Exchange Management Shell.

Get-ReceiveConnector “ReceiveConnectorName” | Remove-ADPermission -User “NT AUTHORITY\ANONYMOUS LOGON” -ExtendedRights “ms-Exch-SMTP-Accept-Any-Recipient”

Don’t forget to replace ReceiveConnectorName with the name of your own receive connector.

That is it, couldn’t be easier, don’t let your system become a spammer!

There are a number of online tools that can help you to check the status of your server to see if you are an open relay or not, I typically use MXToolbox.


Add your comment (5)

Enterprise Consultant
Mimecast

We’re on the verge of a New Information Age. The old one has been around for thirty years or more, and it’s legacy is not all that wonderful. There’s been an explosion in the volume of data produced, sent and stored on servers, desktops and laptops around the world. Companies have tried to manage by keeping pace, adding servers, amassing file stores and updating PCs every few months.

Email, not surprisingly, has been at the heart of this digital big bang, with 97% of written business communication based on email, and some 84% of corporate IP being held in email systems. For IT Directors and managers of corporate email systems, then, the Information Age has resulted in a complex and costly IT infrastructure, accompanied by huge levels of risk, given the critical value of the information held in these systems.

Continue Reading →

Add your comment (1)