Planetary Defense Force
In Warhammer 40,000, a Planetary Defense Force is, as the name suggest, an armed force that protects a single planet (as opposed to the Imperial Guard, which travels from planet to planet). They have a tendency to try to respond, but to be killed to a man.
The Imperium of Man is a very feudal empire; while much is made of the Space Marines and Imperial Guard, they cannot be everywhere at once, and so each world is expected to be able to protect itself. On civilized worlds, the PDF fill that role, either fending off attack entirely, or holding out long enough for off-world assistance to arrive.
We never hear about their victories, partly because stories where the PDF wins are not as interesting as those where the Imperial Guard and Space Marines have to get called in, and partly because most planets make their Imperial Tithes by bundling the best few percent of their Planetary Defense Forces into IG Regiments and shipping them off-world. This results in the PDF losing its most competent members, which means that when planetary threats do arrive, they can fold like wet paper. As such, the Imperial Guard consider them grossly undertrained, incompetent, and poorly armed compared to the Guard. The irony of this is lost on the Guard itself. Better yet, it highlights just how bad it is to be a member of the PDF.
To be fair, not all PDF are incompetent pushovers. For example, Cadia's entire population is militarized from birth, in reserve if not in active duty, and those active duty Cadians who are selected to stay instead of being shipped out to the Guard are chosen at random instead of by lack of merit. This means that Cadia's PDF is every bit as skilled and tough as any of the planet's many exported Imperial Guard regiments, and train just as hard, just as frequently, and are just as well supplied for being on a fortress world. However, examples like this are the exception rather than the rule when it comes to PDF quality.
Often, when PDF aren't incompetent, they turn traitor. While an Imperial Guard unit is constantly shuffled from world to world, only resting in transit, and under the watchful eye of a Commissar, the PDF may go for years or even lifetimes without seeing a planet-scale defensive effort. As such, they often also serve as local law enforcement. This can result in the PDF being more loyal to the planetary government than to the Imperium; if the planetary government turns corrupt, they can bring the PDF with them, which makes it that much harder for the Imperium to reclaim the planet later.
The two notable exceptions to this rule are the Armageddon PDF, who often fight the orks still on the planet, as a result to a lower than normal Tithes for a planet of its size allowing the Armageddon PDF to be well trained and funded. The other is the Ultramar Auxilia, as Ultramar has no tithe due to supporting the Ultramarines Space Marine Chapter, also since they must meet the standards of Space Marines resulting in higher than normal training, generally they are still shipped offworld like normal guard and often support the Ultramarines.
The greatest irony is that if the Imperium would only enforce the training of planetary defence forces to a decent standard (as they are so eager to get their mitts on your tithes!) then the heretic and xenos would have a damn harder time taking over worlds and the guard and marines won't have to keep running in to save them and could actually concentrate on the full scale invasions (But of course that much common sense won't be at all grimdark enough....)