A method of passivating current-shunting defects in a photovoltaic device and such passivated photovoltaic devices are described. The photovoltaic device includes a thin film body with a superposed electrode comprised of a layer of transparent electrically conductive electrode material. The method includes converting the transparent, electrically conductive electrode material to a material having a higher electrical resistivity than the transparent electrically conductive electrode material or by removing the transparent conducting electrode material, by simultaneously: 1) immersing at least a portion of the electrode in a conversion reagent, 2) illuminating the immersed electrode with a suitable source of illumination, and 3) applying an appropriate electrical bias to activate the conversion.
 This invention was made with Government support under AFRL-Kirtland "Lightweight and flexible thin film solar cells based on amorphous silicon and cadmium telluride" under contract F29601-02-C-0304 and National Renewable Energy Laboratory "High efficiency and high rate deposited amorphous silicon solar cells" under contract NDJ-2-30630-08. The government has certain rights in this invention.