Breaking up may be hard to do, but in the case of 76 year-old Hewlett Packard, it’s not just hard: it’s exhausting, expensive, and necessary.
For nearly a year, legions of the tech giant's IT workers and consultants were busy splitting up its internal computer systems in prelude to cleaving H.P. into two separate companies on Sunday. Hewlett Packard Enterprise will focus on selling data center hardware and consulting services while HP Inc. will sell PCs and printers.
That meant taking existing email, payroll, accounting, inventory tracking, and server farms—and dividing them in two. Everything had to be switched without any hiccups that could leave thousands of employees at either of the newly independent businesses in the dark ages.
Scott Spradley, chief information officer for H.P.'s finance and legal operations, recalled his reluctance when told a year ago that he would be in charge of the huge undertaking. A top executive mentioned that Spradley's prior experience working on Intel's integration with a partner had landed him the job.
Spradley's response: “Who told you that? Because we need to find that person and I need to punch him in the throat.”
Companies of all stripes must tackle serious IT challenges when acquiring businesses, selling off divisions, and spinning out parts of their operations, as H.P. has done. And a lot can go wrong.
Asish Ramchandran, a principal in Deloitte’s mergers and acquisition group, which helps companies handle the complexities, explained that the process is like “managing a divorce proceeding.” Joint accounts need to be separated, items need to be allocated to the right parties, and payments need to be paid.
In one job he worked on, the IT team for a company being split apart failed to factor in operations in Brazil. The team set up a system that didn’t correctly report inventory under Brazilian law, ultimately earning the company a fine.
H.P. (hpq) is a sprawling company with 300,000 employees globally, making the split just that much more difficult. It is a venerable Silicon Valley institution with decades of data stored on a hodgepodge of computer systems.
CEO Meg Whitman decided to separate the companies in a high-profile effort to reignite their growth. Hewlett Packard has struggled in recent years as consumers moved away from buying PCs and printers. To make matters worse, business customers have increasingly shifted from buying servers to paying for computing on demand from companies like Amazon (amzn) and Microsoft (msft). Nothing H.P. executives have done has helped to restore the company's momentum.
Joking aside, Spradley explained to Fortune that he was ready for the challenge because H.P.’s complicated IT infrastructure needed to be streamlined. It was one of the reasons for the company had trouble being competitive.
First, Spradley had to untangle systems that both of the newly independent companies relied on. The inventory tracking system, for example, would log orders and record sales for both networking hardware (part of the new Hewlett Packard Enterprises) and personal computers (part of the new HP Inc.).
Spradley likened it to having to fill a bucket by pouring water through 15 different pipes. Of course, pouring water directly into the container would be far easier.
As a precaution, H.P. executives decided against waiting until Nov. 1 to find out if all their replumbing of H.P.'s technology had succeeded. They instead set a deadline in August to give them time to iron out any wrinkles.
Spradley immediately jumped into the job by spending the first few months planning. He and his team had to figure out what software the company used, how it interacted with the company’s hardware, and what software the divided companies would need going forward.
“It was just pedal to the metal at that point on,” said Spradley, who eventually drafted 550 IT employees to help out.
It was not enough to determine that H.P. had 2,500 software services. They had to determine which of the two companies would "own" each one.
They would keep the data relevant to the company that "owned" it. But to complicate matters, they had to wipe the left over data that was relevant to the other.
If it was impossible to determine who "owned" what, Spradley's team would clone the service so that both companies could use it.
The team needed to take extra care when working with 18 software programs deemed so important that absolutely nothing could go wrong with them during the transition, Spradley said. H.P. referred to these as “Defcon zero systems,” and they included payroll software, sales tracking services, and the systems that managed its supply chain.
If these systems crashed, H.P. would be unable to pay workers, take orders, and ship inventory. To avoid a last minute disaster, the IT team worked on these critical systems first to give them more time to troubleshoot.
After the initial blueprinting phase, the team then spent the next couple of months tearing apart the old systems and building new ones. The job included cleaning data, migrating retained data to other systems, and installing the underlying software onto new hardware.
HP already had 35,000 servers in use, Spradley said. His team had to add several thousand more to support the new systems.
Over a period of just six weeks, HP built 6,000 servers loaded with the appropriate software. Typically, it takes H.P. about one year to install 1,200 servers, he said.
The team spent the last 100 plus days testing out the revamped infrastructure, including ensuring that the correct employees had access to the appropriate software and fixing any errors. H.P. had to be “uncompromising on the test time frame,” Spradley said, because a broken system could up hurting the business and damaging the brand.
H.P.’s separation team ended up running 300,000 different tests and resolved every single problem, he said.
During routine check-ins, H.P. executives would give “beat downs” to Spradley and his team over missed deadlines. The mood was that frantic, he explained.
But eventually, Spradley said that it became clear to everyone that his team was on target to finish the massive project by the August deadline. “The beatings stopped at that point,” he said. But he still had to repeatedly reassure colleagues that their worst fears of “people running around with their heads cut off” when the spinoff happened wouldn't come to pass.
“It’s not going to be like that,” Spradley told the executives. “We tested this thing every which way.”
Spradley said that the job was completed by August 1, and that, so far, no major problems have cropped up. The companies have been operating as separate entities for several months, at least when it comes to the technology powering them. People are getting paid and orders are being tracked. Emails end up in the correct inboxes.
During the company’s earnings call in August, CEO Meg Whitman bragged about the success of the split of the company's internal technology. She said the company worked with over 3,500 customers and partners to prepare them.
“This was a huge accomplishment,” Whitman said.
Still, although the technology transition may be complete, both of Hewlett Packard's legacy companies face challenges ahead — aside from the obvious business obstacles. For one thing, there is the issue of company culture.
As Sachin Shah, a partner in Bain & Company's London office explained, employees sometimes consider one company in a spin off to be less attractive than the other. Workers may not want to go to the weaker company.
In one company split Shah worked on, it was clear that one of the businesses was on a growth spurt while the other one was going to operate more “lean and mean,” he said. All the IT talent wanted to work at the company that was expanding because it sounded more exciting.
Regardless, Spradley, who is now chief information officer of Hewlett Packard Enterprise, remains optimistic that workers at both H.P. companies will be able to do their jobs when they get into the office today. At least, that's the hope.
“It’s like winning the high school championship and then going to win the Super Bowl,” Spradley said. “I think that our separation was really that Super Bowl moment.”
Subscribe to Data Sheet, Fortune’s daily newsletter on the business of technology.
For more on Hewlett-Packard, check out the following Fortune video: