As I described in one of your other questions, an EMP works by generating a magnetic pulse which, in turn, induces a current in any conductor it passes through. (This is a rough approximation anyway.) (Interestingly, this would briefly "switch on" any electromagnet it happened to pass through if it wasn't already on to begin with.)
As I implied there, the amount of current generated in the target(s) is related to the amount of energy that went into the EMP. Electromagnets -- especially ones powerful enough to degauss a hard drive -- need to operate at very high currents. As a result, it's certainly possible that an EMP that fried sensitive electronics nearby, like the ICs in the computers or the cops' walkie-talkies, an act that takes very little current to pull off, would be woefully inadequate to harm the electromagnet even if it had no shielding of any kind.
Similarly, whatever is used to power the electromagnet must by necessity be able to generate (and, by extension, tolerate) the high current the electromagnet requires. It, too, is likely to survive an EMP only powerful enough to destroy relatively sensitives microchips. However, the power source might itself be computer controlled, or might have relatively delicate control circuits within it; in this case it would either be disabled, or would need to be shielded (unless it was located out of the effective range of the EMP). Being "tied to the grid" (i.e. using the power from the wall socket) would most likely not work at all, as the EMP, while most likely being inadequate to do any real harm, would almost certainly induce backcurrents in the electrical lines and result in breakers all up and down the grid being tripped, blacking out a good chunk of the area.