Microsoft is cutting 10,000 jobs, or about 5% of its workforce. It says a looming recession has forced customers to cut back on spending.