The electronics need not be "on". The destructive high voltage discharge would be induced by the EMP itself, not by the device's power supply. Shielded electronics might survive, depending on the shielding.
With the Sun acting up, I'm more worried about another 1859 event than EMP from Iran. But whatever. It works either way. ;)
/johnny