The Pentagon and State Department plan to aggressively pursue President Barack Obama's military and diplomatic goals in the remaining two months in office despite potential conflicts with the views of President-elect Donald Trump.

Pentagon Press Secretary Peter Cook said Defense Secretary Ashton Carter was committed to a "smooth and effective transition" to the next administration but also made a point to note "we do this job right, and we serve the current commander-in-chief."

Carter was "carrying out the policies of the current commander in chief," Cook said. "We have one commander-in-chief at a time. We leave it to the next administration to speak to their policy choices."

The press secretary and a State Department counterpart, Mark Toner, said the departments were following Obama's policies on Iran, Iraq, Syria, North Korea, China, NATO, and climate change -- all areas in which Trump has expressed pointed differences of opinion. However, Cook said "we're not going to get into a policy debate that was part of the campaign."

As for policy decisions by incoming administration officials, Cook told reporters Thursday at a Pentagon briefing, "You're best served by speaking to them."

In a memo to all service members and Defense Department employees on Wednesday, Carter said "we must stay focused on our duty to confront our current challenges and any that might arise during this period."

Cook said Carter was also still committed to seeking ways to close the detention facility at Guantanamo Bay, Cuba, though progress on that front appeared extremely unlikely in a lame duck session of Congress.

Closing Guantanamo "remains certainly a priority for this secretary" and if congressional leaders wanted to discuss ways to do that, Carter would be "open to having that conversation," Cook said.

From his first day in office, Obama made closing "Gitmo" one of his main priorities, but he has been thwarted by Congress' refusal to permit the transfer of any prisoners to the U.S. for detention or trial.

Guantanamo once held 781 detainees, but the population has shrunk under releases and transfers to other countries during the administrations of former President George W. Bush and Obama to the current number of 60.

Carter has appointed his chief of staff, Eric Rosenbach, to oversee the transition to the Trump administration but as of Thursday morning "we had not had any direct contact from anyone from the Trump campaign," Cook said.

Cook didn't respond directly when asked if Carter would consider staying on as defense secretary in a Trump administration if asked, but his answer to another question on the state of the military suggested that he would be stepping down when the new president is inaugurated on Jan. 20.

"The secretary believes he inherited a military in excellent shape and he believes he's leaving with a military in excellent shape -- the best military in the world," Cook said.

Cook also said Carter was hopeful that his "Force of the Future" initiatives to lure high-tech talent from Silicon Valley and elsewhere to the Pentagon through the new Defense Innovation Board and Defense Innovation Unit Experimental (DIUx) would survive in the next administration.

"The secretary is confident that good ideas survive," Cook said. "The Force of the Future initiatives are all initiatives that make good sense" in recruiting and retention. "It's a signature issue for him."

Cook said there were no signs of resignations at the Pentagon ahead of Trump's inauguration -- "I'm not aware of any at this point" -- but State Department spokesman Toner was less definite on whether many career diplomats would leave rather than work under a new president.

"It's a valid question," Toner said at a briefing Wednesday. "I wouldn't attempt to speak for any of my colleagues," he added, noting the State Department was committed "to making sure that this incoming administration is given every opportunity for a smooth transition."

Toner said it was also a "fair question" on whether morale at the State Department was shaken when it became clear that Trump had won the election. "You have to compartmentalize your own political beliefs" to stay focused on professional duties, he said. "I wouldn't predict any mass exodus," he added, but "anything's possible."