The energy requirements to generate a large enough magnetic field to shield an entire planet from radiation is many orders of magnitude higher than any reactor we already have on this planet can produce, let alone from solar power, and let alone the energy requirements from cooling, etc. In other words, this is science fiction. It isn’t something we even know we could do.