Updated with comments from Jim Cramer and with Friday share price.

Microsoft (MSFT) - Get Report is showing that its cloud offerings are helping not just the top line, but moving Microsoft into direct competition with Amazon (AMZN) - Get Report .

Microsoft's fiscal second quarter handily surpassed expectations, as the Redmond, Wash.-based Microsoft earned an adjusted 78 cents a share on $25.7 billion, thanks in part to its cloud offerings.

Analysts surveyed by Thomson Reuters expected the company to earn 71 cents a share on $25.3 billion in revenue.

Microsoft's Intelligent Cloud unit saw revenue rise 5% year over year to $6.3 billion. Strong growth came from Microsoft's Azure cloud offering, which competes with Amazon Web Services in hosting and providing services and various software for companies. Microsoft said Azure revenues rose 140% in constant currency.

There was also strength from Microsoft's Surface products, which accounted for $1.2 billion in the quarter, up 29% year over year, thanks to new products such as the Surface Book and the Surface Pro 4.

Shares were rising sharply Friday, gaining 4.5% to $54.40 by midmorning.

"They are really advancing on Azure, which is their web offering. This is their cloud, gigantic business that they are moving aggressively into," said Jim Cramer, portfolio manager of the Action Alerts Plus Portfolio. "[Nadella] is such a good CEO."

Here's what several analysts had to say following the results:

Pacific Crest Securities analyst Brendan Barnicle (Overweight, $65 price target)

"With the strong cash flows from its  legacy  Windows  and  Office  franchise,  and  its  explosive  growth  in  its  cloud offerings, MSFT offers investors consistent cash flows and exciting growth. As a highly liquid stock with a reasonable valuation, MSFT is particularly well suited for the current equity market."

Deutsche Bank analyst Karl Keirstead (Buy, $65 price target)

"The 71% growth in MSFT's total cloud suite (Office 365, Azure, Dynamics) and the  140% c/c growth in Azure (AWS posted 69% 4Q15 growth) should leave investors very comfy with MSFT's all-important cloud story. The real upside to the guidance came on the hardware side as Windows again outperformed the PC market, gaming revs growth was strong and new Surface and other device launches beat MSFT's expectations. The on-premise Server Product biz posted solid 5% c/c growth (albeit down from 9% last qtr) despite a tough macro IT backdrop. Within this segment, the SQL Server database biz was strong (in contrast to ORCL's weakness) but Windows Server was soft (in contrast to RHT's strength).

"For FY16, we're increasing our revs estimate to $92.65b."

MKM Partners analyst Kevin Buttigieg (Neutral, $52 price target)

"We are maintaining our Neutral rating on MSFT shares. F2Q16 results were generally good and are apt to be well received by a nervous market. But while MSFT beat revenues and EPS, some vulnerabilities were noted.

"All of the revenue upside to guidance was from the More Personal Computing segment, in part from new Surface devices but also from core PCs (a higher mix of premium Windows 10 consumer PCs and an inventory build of business PCs). Both should reverse, and hence F3Q16 guidance is lower than consensus for both revenues and EPS. This, and the fact that declines in on-premise Office sales (attached to PC's) offset growing Office 365 sales in both the Business and Consumer markets demonstrates MSFT's still continuing reliance on traditional PC's. But commercial orders were strong (up 19% ex-FX) as is the commercial annuity mix (83%, up 5% Y/Y) which increases stability.

"Combined with continuing opex discipline, this should lead to double digit EPS growth in 2HCY16, although the stock's 18x P/E likely requires this, and MSFT could be vulnerable to a more than expected degree should the macro environment worsen."

Nomura Securities analyst Frederick Grieb (Buy, $65 price target)

"Microsoft reported F2Q'16 revenue and NG EPS of $25.7bn and $0.78, which was better than the Street at $25.3bn and $0.71 and our estimates of $25.3bn and $0.72, respectively. Microsoft also reported F2Q'16 Commercial bookings growth of 19% yoy cc, up from 10% yoy cc in F1Q'16. Contracted not billed ended the quarter at an all-time high of $25.5bn, primarily due to timing of large renewals. Windows OEM declined 5% yoy versus our estimate of -3% yoy, primarily due to a decline in PC shipments of 8% yoy. Microsoft guided to F3Q'16 Non-GAAP revenues (excluding Win 10 deferrals) of $21.6-22.3bn, slightly below Street estimates at $22.4bn. Shares trade at 12.9x our CY16E EV/ uFCF.

"We are positive on the stock as we believe the O365 transition is ahead of plan, Windows declines are likely to moderate and we expect the company will continue to outperform on the operating expense side of the business. Risks include model transition and execution."