Microsoft stock hits a new all-time high. Here's why

Microsoft and Adobe form cloud partnership
Microsoft and Adobe form cloud partnership

The boom times are officially back for Microsoft.

Microsoft (MSFT) stock opened above $60 a share on Friday morning, setting a record high for the first time since the height of the dot com bubble in 1999.

The stock soared 5% overnight following a strong earnings report, which showed remarkable 116% sales growth in Microsoft's cloud-computing business, Azure.

But the road back to $60 has been years in the making.

Under previous CEO Steve Ballmer, Microsoft failed to compete with Apple (AAPL) with portable music players and smartphones -- the defining technology of this decade. It also largely missed out on the shift to Internet services like search and file storage, ceding ground to Google (GOOGL) and other upstarts.

After what can only be described as a lost decade (and then some), Microsoft brought on current CEO Satya Nadella in early 2014 and took a more disciplined approach.

Nadella boosted Microsoft's investment in Azure, likely recognizing the fast growth of Amazon's secret weapon, Amazon Web Services, which powers web operations for big names like Airbnb and Reddit.

Azure helped Microsoft grow its overall cloud revenue 8% to $6.4 billion in the most recent quarter, offsetting declines elsewhere in Microsoft's phone and gaming sales.

Related: Patriots' Bill Belichick says paper works better than a Microsoft Surface

Just as importantly in the eyes of investors: the profit margin for Microsoft's "commercial cloud" operations continues to improve, hitting 49% in the most recent quarter, up from 42% in the prior quarter. Translation: Microsoft is doing more cloud-services business and taking in a greater percentage of profits as it grows.

In an investor note Friday, William Blair analyst Jason Ader said he has "increasing confidence in Microsoft's long-term position in the cloud." He expects that will allow Microsoft to grab more corporate dollars on IT spending in the future.

Microsoft has also made a strategic push to move away from Office software that comes in a box originally designed for PCs, a declining market. It now also offers Office 365, a cloud version of Microsoft's iconic services, which works across devices and charges a subscription fee.

Office 365 revenue surged 51% in the most recent quarter from the same period a year earlier, showing the promise of this subscription-based approach.

Microsoft's pending $26 billion deal to buy LinkedIn (LNKD) is said to tie in closely with its efforts to remake Office. In a memo to employees earlier this year, Nadella said Office could use data from LinkedIn to "suggest an expert to connect with via LinkedIn to help with a task you're trying to complete."

Not everything is going well for Microsoft, however.

Microsoft Band, its attempt at a fitness tracker, is effectively dead. The Xbox, one of Microsoft's more beloved products, saw revenue decline in the most recent quarter. And phone sales continue to tank, falling 72% this quarter from a year ago.

As much as Microsoft might love to skip past the smartphone era to the next big thing by investing in augmented reality or artificial intelligence, there is no guarantee that shift is happening anytime soon.

Still, investors are willing to bet on Microsoft's long-term potential for cloud and productivity tools. Then again, it also helps to have a bit of financial engineering involved, too.

Last month, Microsoft announce plans to raise its dividend by 8% and buy back another $40 billion in stock. These stock buybacks typically help inflate a company's earnings-per-share and buoy the stock price.

CNNMoney Sponsors