Image copyright Getty Images Image caption Microsoft posted a loss for the fourth quarter

Microsoft has reported a $3.2bn net loss for the three months to 30 June after posting $8.4bn of writedowns.

Earlier this month the company announced a $7.5bn charge to write down the value of its Nokia mobile phone business.

Revenue fell 5% to $22.18bn amid weak demand for its Windows operating system.

Microsoft posted a net profit of $4.6bn for the same period in 2014.

Amy Hood, chief financial officer, said the company ended its financial year with "solid progress against our strategic priorities".

Satya Nadella, chief executive, said: "Our approach to investing in areas where we have differentiation and opportunity is paying off with Surface, Xbox, Bing, Office 365, Azure and Dynamics CRM Online all growing by at least double-digits. The upcoming release of Windows 10 will create new opportunities for Microsoft and our ecosystem."

Net profit for the full year more than halved to $12.2bn, but revenue rose $6.7bn to $93.5bn.