  We consider a D dimensional Kasner type diagonal spacetime where metric
functions depend only on a single coordinate and electromagnetic field shares
the symmetries of spacetime. These solutions can describe static cylindrical or
cosmological Einstein-Maxwell vacuum spacetimes. We mainly focus on
electrovacuum solutions and four different types of solutions are obtained in
which one of them has no four dimensional counterpart. We also consider the
properties of the general solution corresponding to the exterior field of a
charged line mass and discuss its several properties. Although it resembles the
same form with four dimensional one, there is a difference on the range of the
solutions for fixed signs of the parameters. General magnetic field vacuum
solution are also briefly discussed, which reduces to Bonnor-Melvin magnetic
universe for a special choice of the parameters. The Kasner forms of the
general solution are also presented for the cylindrical or cosmological cases.
