HERSHEY, Pa. - Even as he praised President Obama for his help with the transition, President-elect Donald Trump took aim Thursday at White House press secretary Josh Earnest, calling him "foolish," "so bad" and incapable of delivering a message.

Trump's broadside came during remarks here at the latest stop on a "thank-you" tour that is taking the Republican to more than a half dozen states in which he prevailed last month against Democratic nominee Hillary Clinton.

In the middle of a meandering speech, Trump said that he had recently had "a great conversation with President Obama," a mention that elicited boos from a crowd packed into a 10,000-seat arena here.

Trump first started to tamp down the reaction but then turned his attention to Earnest.

"This foolish guy, Josh Earnest, I don't know if he is talking to President Obama," Trump said. "You know, having the right press secretary is so important, because he is so bad, the way he delivers a message."

"He can deliver a positive message and it sounds bad. He could say, 'Ladies and gentleman, today we have totally defeated ISIS,' and it wouldn't sound good," Trump said, referring to the Islamic State terrorist organization.

On the subject of defeating ISIS, Trump added: "I have a feeling they won't be saying it, but I know we will be saying it."

Trump's comments come as Earnest has said in recent days that Trump knowingly benefited from Russian involvement in the U.S. election and encourage hacking in his victory over Clinton.

"It is just a fact — you all have it on tape — that the Republican nominee for president was encouraging Russia to hack his opponent, because he believed that would help his campaign," Earnest told reporters on Thursday. "It is not a controversial statement. I'm not trying to be argumentative. But I am trying to acknowledge a basic fact."

Trump has voiced skepticism about the Russian government being involved in hacks of Democratic email accounts.

Much of Trump's address was devoted to recounting news coverage of his Election Night victory. The president-elect mocked many of the television reporters and pundits involved. He said at one point CNN anchor John King looked like he was "getting ready to throw up all over" as he relayed the results.

Trump became the first Republican to carry Pennsylvania since 1988. He thanked his audience, but said that because it took so long for the news media to declare him the winner, "we didn't even need you guys."

Trump sought to end the night on a unifying note, saying he wants to "heal our divisions and unify our country."

"My message tonight is for all Americans, from all parties, all beliefs, all walks of life," Trump told a largely white audience. "Whether you are African-American, Hispanic-American or Asian-American or whatever the hell you are, remember that we are all Americans and we are all united by one shared destiny."