Do all planets have a magnetic field?
Planetary magnetic fields are produced by churning motions of liquids at a planet’s core that conduct electricity and have an electric charge.Except for Mercury,the rest of the planets (excluding Pluto as well) have a magnetic field.
Mercury has a very complicated and a very mysterious rotation, explaining why it does not have a magnetic field. Venus rotates too slow (its day is longer than its year) and it has a very weak magnetic field. Mars also has a very very weak magnetic field, explaining why it has a thin atmosphere.