Digital micromirror devices (DMDs) are a mature commercial technology, with several potential applications in space-based instruments. In particular, DMDs are currently the only practical alternative to microshutter arrays as slit mask generators for space-based multi-object spectrometers (MOS). A DMD is an array of micromirrors which can be addressed individually and tilted into one of two states (+/- 12 w.r.t. the device plane), which makes it a very versatile binary light modulator. These devices are widely utilized in a variety of optical systems, especially projectors. Recently, the use of DMDs for ground-based multi-object spectrometers has been demonstrated. The compact size and small weight of DMDs makes them especially attractive for a space- based MOS, where the only current alternative is an array of microshutters. DMDs were originally designed for visible range applications; therefore the protective glass window they are supplied with does not have sufficient throughput in the UV or IR and has to be replaced. In this work, we describe the procedure by which we replaced the standard window with UV-grade fused silica, sapphire and magnesium fluoride. We performed initial shock and vibrational tests to evaluate the mechanical robustness of the re-windowed devices, to investigate the ability of these devices to survive launch conditions. We performed residual gas analysis to study the outgassing properties of the new DMDs and evaluate the ability of the new seals to protect the device. The tested devices show near-hermetic seals before and after the mechanical testing.