Here is the full memo to employees from Microsoft CEO Steve Ballmer (pictured here) about the 5,000 layoffs and other cost cuts just announced, due to economic slowdown, which also resulted in weak financial results for the second quarter.

It is not a happy missive, obviously.

But tough times have also hit Microsoft (MSFT).

“…We believe these job eliminations are crucial to our ability to adjust the company’s cost structure so that we have the resources to drive future profitable growth,” wrote Ballmer, in part.

But read it for yourself below in its entirety:

From: Steve Ballmer

To: All Microsoft FTE

Subject: Realigning Resources and Reducing Costs

In response to the realities of a deteriorating economy, we’re taking important steps to realign Microsoft’s business. I want to tell you about what we’re doing and why.

Today we announced second quarter revenue of $16.6 billion. This number is an increase of just 2 percent compared with the second quarter of last year and it is approximately $900 million below our earlier expectations.

The fact that we are growing at all during the worst recession in two generations reflects our strong business fundamentals and is a testament to your hard work. Our products provide great value to our customers. Our financial position is solid. We have made long-term investments that continue to pay off.

But it is also clear that we are not immune to the effects of the economy. Consumers and businesses have reined in spending, which is affecting PC shipments and IT expenditures.

Our response to this environment must combine a commitment to long-term investments in innovation with prompt action to reduce our costs.

During the second quarter we started down the right path. As the economy deteriorated, we acted quickly. As a result, we reduced operating expenses during the quarter by $600 million. I appreciate the agility you have shown in enabling us to achieve this result.

Now we need to do more. We must make adjustments to ensure that our investments are tightly aligned with current and future revenue opportunities. The current environment requires that we continue to increase our efficiency.

As part of the process of adjustments, we will eliminate up to 5,000 positions in R&D, marketing, sales, finance, LCA, HR, and IT over the next 18 months, of which 1,400 will occur today. We’ll also open new positions to support key investment areas during this same period of time. Our net headcount in these functions will decline by 2,000 to 3,000 over the next 18 months. In addition, our workforce in support, consulting, operations, billing, manufacturing, and data center operations will continue to change in direct response to customer needs.

Our leaders all have specific goals to manage costs prudently and thoughtfully. They have the flexibility to adjust the size of their teams so they are appropriately matched to revenue potential, to add headcount where they need to increase investments in order to ensure future success, and to drive efficiency.

To increase efficiency, we’re taking a series of aggressive steps. We’ll cut travel expenditures 20 percent and make significant reductions in spending on vendors and contingent staff. We’ve scaled back Puget Sound campus expansion and reduced marketing budgets. We’ll also reduce costs by eliminating merit increases for FY10 that would have taken effect in September of this calendar year.

Each of these steps will be difficult. Our priority remains doing right by our customers and our employees. For employees who are directly affected, I know this will be a difficult time for you and I want to assure you that we will provide help and support during this transition. We have established an outplacement center in the Puget Sound region and we’ll provide outplacement services in many other locations to help you find new jobs. Some of you may find jobs internally. For those who don’t, we will also offer severance pay and other benefits.

The decision to eliminate jobs is a very difficult one. Our people are the foundation of everything we have achieved and we place the highest value on the commitment and hard work that you have dedicated to building this company. But we believe these job eliminations are crucial to our ability to adjust the company’s cost structure so that we have the resources to drive future profitable growth.

I encourage you to attend tomorrow’s Town Hall at 9am PST in Café 34 or watch the webcast.

While this is the most challenging economic climate we have ever faced, I want to reiterate my confidence in the strength of our competitive position and soundness of our approach.

With these changes in place, I feel confident that we will have the resources we need to continue to invest in long-term computing trends that offer the greatest opportunity to deliver value to our customers and shareholders, benefit to society, and growth for Microsoft.

With our approach to investing for the long term and managing our expenses, I know Microsoft will emerge an even stronger industry leader than it is today.

Thank you for your continued commitment and hard work.

Steve