Former U.S. secretary of state Colin L. Powell takes part in an onstage interview with Aspen Institute President Walter Isaacson, left, at the Washington Ideas Forum on Sept. 30, 2015. (Jonathan Ernst/Reuters)

Donald Trump is “a national disgrace and an international pariah” who gave voice to a “racist” movement to question President Obama’s citizenship, former secretary of state Colin L. Powell tapped on his keyboard.

Hillary Clinton, he typed in an email to another friend, is a “greedy, not transformational” figure who messes up everything she touches because of her “hubris” and has a husband still, well, entertaining “bimbos” while she is away.

Former vice president Richard B. Cheney and his daughter are “idiots” flacking their new book, and the Iraq War was mishandled from the get-go by the Defense Department’s top officials.

Other than that, the retired general and statesman wrote in one exchange, “alls well with the Powells.”

That probably was not the case Wednesday, as the respected former chairman of the Joint Chiefs of Staff became the latest chess piece in what appears to be nothing less than a full-bore attempt by the Russian government to embarrass the American body politic.

The Powell disclosures — more than two years’ worth, ending last month — were posted on a site that analysts have linked to the Russian government.

They come as the FBI is probing the extent to which Moscow is carrying out an unprecedented digital campaign to potentially undermine confidence in the political process here.

The nation’s top national security officials warned Wednesday that the United States is prepared to respond to whoever is behind the hacks of political organizations such as the Democratic National Committee.

“Nobody should think that there’s a free pass,” said Lisa Monaco, President Obama’s adviser on homeland security and counterterrorism, when asked at a Center for Strategic and International Studies conference about the hacks linked to Russia.

A Powell spokeswoman attested to the authenticity of the emails. “We have confirmed that the general has been hacked and that these are his emails,” Peggy Cifrino said. “We have no other comment at this time.”

Powell’s emails were posted on a once-obscure Web site, DCLeaks, which appeared in mid-2016 to publish material hacked from “top-ranking officials and their influence agents.” The site claims it was launched by “American hacktivists who respect and appreciate freedom of speech, human rights and government of the people.”

But analysts at cybersecurity firm ThreatConnect who have scoured the site say that its registration and Web hosting data align with a known Russian military intelligence hacker group dubbed Fancy Bear.

The Powell emails were assembled and posted under password protection Tuesday night. BuzzFeed and the Intercept led the way, and reporters found an unvarnished reflection on the 2016 election, U.S. war efforts in Iraq, attempts by Powell to dissociate himself from Clinton’s use of a private email server when she was secretary of state, and a plea from one of Obama’s former Cabinet members that Powell join the race for president.

Trump receives the brunt of Powell’s harsh words, but a 2014 email to a Democratic donor about Clinton is the definition of damning with faint praise:

“I would rather not have to vote for her, although she is a friend I respect. A 70-year person with a long track record, unbridled ambition, greedy, not transformational, with a husband still d-----g bimbos at home (according to the NYP).” The reference presumably is to a story in the New York Post.

But Powell reserved his greatest disdain for Trump.

Of the birther movement, which Trump led earlier this decade by publicly questioning whether Obama was born in the United States, Powell said its underpinnings were clear.

“Yup, the whole birther movement was racist,” Powell wrote to journalist and former aide Emily Miller on Aug. 21. “That’s what the 99% believe. When Trump couldn’t keep that up he said he also wanted to see if the certificate noted that he was a Muslim.”

In another email to Miller on Aug. 21, Powell scoffs at Trump’s apparent effort to reach out to African Americans in recent weeks and says Trump takes them “for idiots.”

“He is at 1% black voters and will drop. He takes us for idiots,” Powell wrote. “He can never overcome what he tried to do to Obama with his search for the birth certificate hoping to force Obama out of the presidency.”

Powell endorsed Obama in both of his campaigns.

He expressed sympathy for Clinton about repeated investigations by congressional Republicans into the deadly attacks on the U.S. outpost in Benghazi, Libya. He called it a “stupid witch hunt” in an email to his successor at State, Condoleezza Rice.

But he bristled at attempts by Clinton and Democratic officials to compare his use of private emails while in the office to her use of a private server.

“I have told Hilleary’s [sic] minions repeatedly that they are making a mistake trying to drag me in, yet they still try,” he wrote in May to Democratic consultant Vernon Jordan. “The media isn’t fooled and she is getting crucified. The differences are profound and they know it.”

In another email he added: “Everything [Clinton] touches she kind of screws up with hubris.”

On other subjects, the 2003 invasion of Iraq and subsequent occupation haunted Powell.

He and Rice exchanged several emails in which they disparaged former defense secretary Donald H. Rumsfeld.

On June 9, 2015, after Rumsfeld claimed he had always been skeptical about U.S. efforts to promote democracy in Iraq after the 2003 invasion, Rice emailed Powell, saying caustically, “If Don and the Pentagon had done their job (after claiming the rights to lead postwar rebuilding — things might have turned out differently). Don should just stop talking. He puts his foot in his mouth every time.”

The next day, Powell sent an email praising the “magnificent job” comedian Jon Stewart had done in a skit on Rumsfeld.

“Don needs to stay out on the shore,” he wrote.

On Aug. 28 this year, Powell turned his ire on Paul D. Wolfowitz, the deputy defense secretary who was one of the architects of the Iraq invasion, after an interview with Der Spiegel in which Wolfowitz blamed the State Department for bungling the occupation by disbanding the Iraqi army and firing Baathists from government jobs.

“Are you going to call Paul and tell him he is a f-----g liar?” Powell wrote to Larry Wilkerson, his chief of staff. “It wasn’t State, it was the President and the guy who reported to Paul. . .”

In the past few months, DC Leaks also has posted caches of emails from retired U.S. Air Force Gen. Philip Breedlove, who until recently was the supreme commander of NATO forces in Europe.

It has also leaked material from the Republican Party and George Soros, a billionaire philanthropist who supports liberal causes.

Releasing emails from Powell, however, was seen as an effort to jack up media interest, analysts said.

“They have to find personalities and content which will cause journalists to take interest,” said Rich Barger, chief information officer at ThreatConnect, which has analyzed the DCLeaks site and links to Russian organizations.

Powell has been hacked before. In 2013, a Romanian hacker known as “Guccifer” hacked his personal email account and released some material, including correspondence that suggested a possible romantic link with a Romanian diplomat. Powell denied having an affair with her.

Included in the latest emails was one from Obama’s former veterans affairs secretary Eric Shinseki, who after Trump’s Super Tuesday victories wrote to ask Powell to jump into the Republican primary.

“I worry at what is happening to your proud and distinguished Party,” Shinseki wrote.

Powell forwarded the message to an aide with a one-word reply: “Sigh.”

His response to Shinseki was a little more diplomatic.

“C’mon Ric. I would be 80 upon my first months in office,” he wrote, adding, “I can’t carry the burden of the GOP. They left me years ago.”

Callum Borchers, Carol Morello, Robert Samuels and Vanessa Williams contributed to this report.