Hewlett Packard Enterprise will soon shrink its workforce about 10 percent by laying off 5,000 employees, sources familiar with the decision said.