We examine the alignment of thin film diblock copolymers subject to a perpendicular electric field. Two regimes are considered separately: weak segregation and strong segregation. For weakly segregated blocks, below a critical value of the field, E_c, surface interactions stabilize stacking of lamellae in a direction parallel to the surfaces. Above the critical field, a first-order phase transition occurs when lamellae in a direction perpendicular to the confining surfaces (and parallel to the field) become stable. The film morphology is then a superposition of parallel and perpendicular lamellae. In contrast to Helfrich-Hurault instability for smectic liquid crystals, the mode that gets critical first has the natural lamellar periodicity. In addition, undulations of adjacent inter-material dividing surfaces are out-of-phase with each other. For diblock copolymers in the strong segregation regime, we find two critical fields E_1 and E_2>E_1. As the field is increased from zero above E_1, the region in the middle of the film develops an orientation perpendicular to the walls, while the surface regions still have parallel lamellae. When the field is increased above E_2 the perpendicular alignment spans the whole film.