Q. Is someone puts his hand inside a bathroom just to turn off the light, does he require washing netilas yodaim?
A. Poskim disagree if entering hands into a beis hakisei requires netilas yodaim. Maharsham (Daas Torah O.H. 4: 18) maintains that only in regards to entering the Beis Hamikdosh is a partial entry an issue.
Others (Ruach Chaim O.H. 3) are stringent and require proper three time washing from a vessel, or at least once (Ben Ish Chai, Toldos). Some opine that just the entering hand should be washed (Mishnas Yosef 5: 6).
Poskim argue that in today’s bathrooms, that are kept clean by constantly being flushed and rinsed, may not be subject to the same degree of ruach ra or spirit of impurity, that possessed the ones in the pre-plumbing era.
Although the minhag is to be stringent and wash our hands after entering them (Minchas Yitzchok 1: 60, Piskei Teshuvos 4: 19, et. al.), Horav Shlomo Miller’s Shlit’a opinion is that in our case one can be lenient, especially in bathrooms that are used also for other purposes such as just washing hands or storing medicines etc. (See Halichos Shlomo 20: 24).
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a