We report on plasmon induced optical switching of electrical conductivity in two-dimensional (2D) arrays of silver (Ag) nanoparticles encapsulated inside nanochannels of porous anodic aluminum oxide (AAO) films. The reversible switching of photoconductivity greatly enhanced by an array of closely spaced Ag nanoparticles which are isolated from each other and from the ambient by thin aluminum oxide barrier layers are attributed to the improved electron transport due to the localized surface plasmon resonance and coupling among Ag nanoparticles. The photoconductivity is proportional to the power, and strongly dependent on the wavelength of light illumination. With Ag nanoparticles being isolated from the ambient environments by a thin layer of aluminum oxide barrier layer of controlled thickness in nanometers to tens of nanometers, deterioration of silver nanoparticles caused by environments is minimized. The electrochemically fabricated nanostructured Ag/AAO is inexpensive and promising for applications to integrated plasmonic circuits and sensors.