The company, under Chief Executive Satya Nadella, has been shifting its focus to software and cloud services as demand for the Windows operating system slows in a weak PC market. Microsoft’s shares rose as much as 9.8 percent to $52.75 in after-hours trading, their highest since March 2000. Microsoft has also been cutting costs and streamlining its operations to focus on more lucrative businesses.