As the Trump administration sets out to overhaul the federal government, a small group of Cabinet secretaries may have the most daunting task. They are running departments with missions they have sometimes disparaged, with employees who are secretly — and on occasion publicly — hostile.

Across the agencies, these Cabinet members have made very public efforts to court their staff, yet frequently are crafting key initiatives in private. They are forming alliances where they can and skirmishing where they cannot. For the most part they have erected small, secluded citadels within each department, where they can advance policies that reflect the priorities of the ­president.

At the Education Department, Secretary Betsy DeVos has been trying to build rapport with a leery staff, dining at times in the employee cafeteria and convening a group of LGBT employees to talk about hot-button issues relating to transgender students. But some employees complain they are being cut out of decision-making. The head of the financial aid division resigned in May, warning in a farewell email of severe constraints being placed on the ability of career officials to “make decisions and deliver on the organization’s mission.”

Interior Secretary Ryan Zinke has invited staffers to his grand office overlooking the Mall to imbibe IPA beer from his home state of Montana and has trumpeted a new policy of allowing employees’ dogs to roam the department’s hallways on selected days. But as soon as government rules allowed, he reassigned dozens of Senior Executive Service career staff members without consultation or notice, relocating some to other parts of the country.

[Zinke transfers dozens of top career officials, without consulting them]

(The Washington Post)

Housing and Urban Development Secretary Ben Carson has braved rush-hour crowds at the L’Enfant Plaza Metro stop to greet employees and shake their hands. But when the agency decided to reconsider a controversial HUD policy granting transgender people access to sex-segregated shelters of their choice, Carson surprised the staffers who had crafted the policy by excluding them from the discussion.

White House spokeswoman Natalie Strom said in an email that President Trump’s Cabinet members are determined to overhaul the way their agencies ­operate.

The president “has recruited an incredibly talented group of individuals to serve in his Cabinet — one of most visible and active Cabinets in recent history,” Strom said. She added, “He has instructed them to work with both political appointees and career employees to streamline the federal government to make it smarter, more effective and more responsive to the American people.”

[HUD Secretary Carson sings a new tune about federal employees]

Among all the Cabinet members, DeVos and Environmental Protection Agency Administrator Scott Pruitt have faced the most vocal resistance from employees, despite efforts to win them over.

Unlike her predecessors, DeVos no longer uses the private, express elevator to reach her seventh-floor suite, taking the same ones that everyone else uses, and has given up the agency’s private chef, according to spokeswoman Liz Hill.

But some employees dismiss her lunches in the cafeteria as photo ops.

EPA Administrator Scott Pruitt answers questions during a White House briefing in June. (Jabin Botsford/The Washington Post)

DeVos has made more of an impact with her decision to rescind a department policy requiring school districts to let transgender students use restrooms and other facilities of their choice. Her decision to reverse that policy — coupled with her refusal to say whether she would block federal funding for private schools that discriminate against LGBT students — has prompted some agency employees to begin talking about resigning.

One staffer who recently quit said he had been disappointed not only by DeVos’s refusal to stand up for LGBT students at a Senate hearing in May, but also by the way he said she refrained from committing to protect African American students and students with disabilities. He criticized “the few and general ways the secretary has claimed to be standing up for students and families.”

DeVos, who has called such accusations “hurtful,” says she is opposed to discrimination of any kind and that any school accepting federal funds must abide by federal law.

[White House installs aides in agencies as Trump’s eyes and ears]

At the EPA, Pruitt’s relationship with the agency was destined to be difficult from the outset because as Oklahoma attorney general, he had sued the EPA more than a dozen times, challenging its regulations policing greenhouse gas emissions, toxic emissions from power plants and the dredging of waterways.

Pruitt has clashed with many staffers over the issue of climate change, in part by questioning the extent to which human activity is driving global warming. Some employees at the agency’s headquarters grouse about having to walk by a sign featuring Pruitt shaking hands with miners. When Pruitt’s appointees directed that the agency take down its climate Web pages containing scientific data and policy details, career officials initially balked. The pages have been removed from the EPA’s website.

Employees at the agency’s regional office in Chicago have participated in nearly a half-dozen public protests over the agency’s budget and administration policy decisions, including the U.S. withdrawal from the Paris climate agreement.

Still, EPA spokeswoman Liz Bowman said that Pruitt has found “the vast majority of the staff are committed to working with us,” and he is working to follow the agency’s statutory authority. She added that he “doesn’t experience the tension that is drummed up in the press.”

At the Energy Department, Secretary Rick Perry is running an agency that he had promised, as a presidential candidate in 2012, to eliminate. (He had famously forgotten the Energy Department’s name during a presidential debate.)

Since taking over, he has kept a lower profile than many other Cabinet secretaries. But Perry has also praised some aspects of the agency, such as its national ­laboratories.

“It’s good to be able to realize when you’ve made an error and admit it,” Perry said during a stop at Oak Ridge National Laboratory last month. “I’m very happy that I’ve had the opportunity to be associated with this agency now.”

The spending cuts included in the administration’s budget, drafted with limited input from the agencies themselves, have left many Cabinet members in a difficult position as they defend the White House’s plan while in some cases seeking to soften the blow.

DeVos has backed a budget proposal that would slash more than 13 percent of the Education Department’s budget while investing in her top priority, school choice.

Pruitt privately pressed for less draconian cuts than those proposed by the White House but was rebuffed, according to senior administration officials briefed on the process. Once the White House settled on a 31 percent cut in the EPA’s budget, Pruitt defended the reductions, although he identified a handful of programs he hopes Congress will restore.

After initial budget figures were released, both Carson and Zinke vowed to restore some of the money that was cut. Carson urged his staff in a memo to disregard the “preliminary numbers” — only to see the final reductions be even deeper. HUD’s budget is to be reduced by 16 percent and Interior’s by 12 percent. Zinke said last month that he plans to eliminate 4,000 jobs. Officials have declined to detail what, if anything, Carson and Zinke did to push for more ­money.

Carson and Zinke seem to have made some inroads, although modest, with their employees.

Carson has tried to get to know his staff, holding events at least once a week at agency offices across the country, including job fairs and town halls for career employees, according to HUD spokesman Raffi Williams. After Carson’s first speech to his staff, some employees grilled him about his priorities. But one staffer, who did not give her name, praised him for addressing the “uncertainties” that she and her colleagues had about the new administration.

Many HUD employees, however, remain skeptical of Carson because of his lack of expertise in housing, his support for scaling back long-standing programs, and his comments in a radio interview last month that poverty is a “state of mind.”

Zinke has sought to boost morale through several initiatives, including a new zero-tolerance policy for sexual misconduct and efforts to secure more comfortable employee uniforms.

But he has upset some of his career employees by asking them to brief him on Interior policies, such as regulating oil and gas drilling in national parks and national wildlife refuges, without telling them that those policies were about to be reversed.

Zinke, perhaps more than any other Cabinet secretary, reflects the Trump administration’s ambivalence about the operations of federal agencies and the people who work in them.

He is quick to praise employees in public, at times tweeting out a “bravo zulu,” the Navy version of a shout-out. But he also has held them up for public ridicule.

Addressing a meeting in June of the Recreational Vehicle Industry Association, Zinke mocked elements of his department’s “bureaucracy” for standing in the way of change.

“When you start to drain the swamp, you know what happens?” Zinke asked. “You start to expose serpents.”

Brady Dennis contributed to this report.