I'm looking for a solution to generate a strong enough magnetic field for planets with iron-cores - in my case, Mars - to keep the atmosphere from getting blow away by the solar winds (and ignoring the low gravity). The solution has to be something that could have been quickly deployed - so no hurling asteroids to Mars - and something that can be destroyed to revert the effects.
I've come up with two solutions myself, first: giant pieces of metal orbiting the planet at high speeds that generate the magnetic field. I don't know how big they would have to be or what kind metal. These could be destroyed with a missile or simply pushing them out of the orbit.
Second: giant electromagnets at the "corners" of the planet, making a grid of some sort. The con with this is that they'd need fuel but they'd be easier to reach for destroying purposes.
Would either of these work or what else I could use if keeping in mind that the field had to be generated relatively quickly, some hundred years instead of thousands it would take with asteroids and something that can be destroyed/reverted? Also I'm building this Mars world for a game, how they would look visually, how often the orbiters would be visible (if at all?) or what kind sound the electromagnets would make?