Kathleen Hogan will be replaced by Amy Coleman, a Microsoft HR executive who had worked in the company for 25 years.