A decade ago, Microsoft (MSFT -0.27%) was reeling. After dominating the personal computer (PC) market with its ubiquitous Windows operating software, the tech giant was slow to react to the smartphone megatrend.

Microsoft fell behind its longtime nemesis, Apple (NASDAQ: AAPL). It watched helplessly as Apple quickly captured the lion's share of the booming smartphone industry's profits with its massively popular iPhone. Windows-based phones paled in comparison.

A desperate Microsoft tried to stage a comeback with its $7.2 billion acquisition of Nokia's smartphone business in late 2013. But the ill-fated deal failed to help Microsoft narrow the gap with Apple.

A visionary leader provides new direction

Microsoft's board of directors knew changes were needed if the lumbering tech colossus was to regain its footing. So, on Feb. 4, 2014, the company named Satya Nadella as its new chief executive officer. 

"During this time of transformation, there is no better person to lead Microsoft than Satya Nadella," founder and director Bill Gates said at the time. Gates' words would prove prescient.

Nadella moved quickly to transform Microsoft into a "mobile first, cloud first" company. He foresaw a world in which cloud computing helped to power billions of devices across the world, and he positioned Microsoft to profit from this massive trend.

Rather than continue futile attempts to lure users away from the iPhone and iPad, Nadella chose to make Microsoft's Office software available on Apple's devices. This made the company's popular Word, Excel, and PowerPoint productivity tools instantly more valuable for users -- and more profitable for Microsoft.

By placing Microsoft's applications at the intersection of the cloud and mobile devices, Nadella was meeting users where they were, not where Microsoft wanted them to be. He saw where the world was going, and he helped Microsoft get there -- fast.

Nowhere was this more apparent than in the rapidly expanding cloud infrastructure market.

Microsoft enters the cloud arena

First-mover Amazon (NASDAQ: AMZN) helped to create the cloud industry by developing the computing tools needed to run its massive e-commerce operations. It then offered them to other companies as a cloud-based service. Amazon Web Services (AWS) would go on to become the dominant provider of cloud infrastructure solutions.

Undeterred, Nadella saw an opportunity for Microsoft to challenge AWS. He positioned the company's Azure cloud platform as an alternative to AWS for businesses that were uncomfortable with handing over their most sensitive data to Amazon. Retailers, many of whom had seen their sales and profits dented by Amazon's sprawling e-commerce operations, flocked to Azure. Retail behemoth Walmart was among them. 

Microsoft went on to use its existing relationships with its corporate customers to win more cloud business in a wide range of industries. It now holds the No. 2 position within the $217 billion cloud infrastructure market with a roughly 21% share, compared to 34% for Amazon, according to Statista. Azure is also growing faster than AWS, with revenue up 35% in the third quarter versus 27% for AWS.

Microsoft is currently focusing on helping its cloud customers cut costs to better withstand a challenging economic environment. "Moving to the cloud is the best way for organizations to do more with less," Nadella said during a recent earnings call. 

Shifting their business processes to the cloud can also make companies more efficient and adaptable, by enabling them to better align their tech-related spending with changing demand and supply trends. Cloud computing is also considered more secure than traditional on-premise networks, with better redundancy and reliability. For these reasons, Nadella sees a "long-term secular trend where digital technology as a percentage of the world's GDP will continue to increase." 

Essentially, this means more money will be spent on cloud technology in the coming years, and Microsoft intends to capture its share of it.

So, how much money would you have?

If you invested $10,000 when Nadella became CEO, you would've purchased approximately 275 shares of Microsoft, based on its stock's closing price of $36.35 that day. Those shares would be worth more than $66,000 today.

Nadella's brilliant leadership has created enormous wealth for Microsoft's shareholders. And with the growth of the global cloud market fueling its long-term expansion, even more gains likely lie ahead for the tech titan's investors.