When I first heard that Netflix was planning a series titled “Space Force,” I thought it was one of the dumbest ideas I’d ever heard. I was wrong.

The 10-episode comedy that reunites “The Office” star Steve Carell with that now-classic sitcom’s executive producer, Greg Daniels, isn’t perfect. But it is frequently hilarious. It’s broad, outlandish, over-the-top and dopey — and there are a lot of laughs in the episodes that start streaming on May 29.

It’s not a one-note wonder. Yes, it was inspired by President Donald Trump’s much-mocked formation of the Space Force — which will, presumably, include space cadets — but it manages to go beyond that. (Although it still manages to mock the current occupant of the White House.)

POTUS — who is never seen and never referred to by name — is an impulsive idiot who governs via tweets. He wants “complete space dominance” and tweeted, “Boots on the moon by 2024.”

“Actually, he said, ‘Boobs on the moon,’ but we believe that to be a typo,” says Secretary of Defense John Blandsmith (Dan Bakkedahl).

Carell stars as Gen. Mark R. Naird, who just received his fourth star and believes he’s about to be put in charge of the Air Force. When Blandsmith tells the Joint Chiefs of Staff that the president has decided to create Space Force, Naird laughs derisively. When he’s told the president wants him to lead Space Force, he’s horrified.

Naird is a stereotypical uptight, rigid military officer. “I can be flexible if I’m ordered to be,” he tells his wife, Maggie (Lisa Kudrow). He’s also at least a little bit racist — he can’t seem to comprehend that one of his top scientists, Dr. Chen Kaifang (Jimmy O. Yang), is an American.

Flash forward a year and Naird is in Colorado working to get Space Force off the ground, trying to keep POTUS and members of Congress (including a doppleganger of Rep. Alexandria Ocasio-Cortez) happy, and dealing with his rebellious teenage daughter, Erin (Diana Silvers) and his senile father, Fred (the late Fred Willard in his final role).

There are a lot of things going on and a lot of recurring characters. The scenes featuring the Joint Chiefs (played by Diedrich Bader, Noah Emmerich, Jane Lynch and Patrick Warburton) are snide, snotty and highly amusing. As are Naird’s ongoing battles with his lead scientist and civilian adviser, Dr. Adrian Mallory (John Malkovich), a relationship that’s both adversarial and, at times, surprisingly sweet.

No, “Space Force” hasn’t worked out all the kinks in the first 10 episodes. It’s wildly uneven from episode to episode — from Naird trying to convince a chimpstronaut to save a Space Force satellite after a Chinese attack to Naird trying to save his relationship with his daughter. And, certainly, not all the jokes and gags it launches land successfully.

But enough work to make it funny.

There’s a definite touch of “Dr. Strangelove” in “Space Force.” And too much is being made of the too obvious comparisons to “The Office.” Yes, they’re both workplace comedies, sort of. But “Space Force” is more in the vein of “Police Squad,” “Reno 911” or even “Get Smart” — an intentionally ludicrous, bombastic and broad parody populated by generally cartoonish characters.

I can’t help but remember that when Daniels and Carell launched their version of “The Office” in 2005, it wasn’t very good. That’s not just my opinion; Daniels himself admitted the six-episode first season was sort of, well, bad. But they figured that show out and turned it into something amazing.

I can’t help but wonder what future seasons of “Space Force” are going to look like.