Microsoft is set to lay off 6,000 employees, representing nearly 3% of its global workforce, as part of an organisational restructuring.