Microsoft (MSFT) shares edged higher in after-hours trading after the tech giant posted fiscal second-quarter earnings-per-share that topped expectations and revenue that was in-line with estimates.

The Redmond, Wash.-based company saw fiscal second-quarter profit of $6.62 billion, or 78 cents a share, compared with year-ago earnings of $6.63 billion, or 77 cents a share.

Revenue increased 5% to $20.89 billion, compared with year-ago sales of $19.95 billion.

Analysts had expected earnings of 76 cents a share on revenue of $20.93 billion, according to a poll by Thomson Reuters.  Earlier Thursday, Wells Fargo analyst Jason Maynard lowered his expectations for Microsoft’s second and third quarter and for the full-year to below consensus, expecting weakness in the PC market to offset any potential upside generated from new products.

The business division saw revenue improve by 3% to $6.28 billion, as the server and tools business saw an 11% increase to $4.77 billion in the quarter.  The online services and entertainment and devices business segments also posted double-digit increases of 10% and 15%, respectively, to revenue of $784 million and $4.24 billion.  

The only segment that posted a revenue decline compared with the year-ago quarter was the Windows and Windows Live division, which saw revenue sink 6% to $4.74 billion.

Steve Ballmer, Microsoft chief executive officer, touted the “solid” results, as the company prepares for a “launch year” for many of its key products.

“Coming out of the Consumer Electronics Show, we’re seeing very positive reviews for our new phones and PCs, and a strong response to our new Metro style design that will unify consumer experiences across our phones, PCs, tablets, and television in 2012,” Ballmer said in a release.

The company also boasted that organic U.S. market share for its search engine, Bing, grew to 15.1% during the quarter.  Looking forward, the company cut its forecast for operating expenses to between $28.5 billion and $28.9 billion for the fiscal year.

Shares of Microsoft fell 9 cents, a fraction of 1%, in the regular session Thursday, closing at $28.14 a share. The stock was up 58 cents, more than 2% in after-hours trading.