Q. May one say Shalom to a woman whose hair is not covered?

A. This questions involves two Issues. Shulchan Aruch (O.H. 75: 2) rules that one may not read the shema or recite any blessing, including any other expression that is considered a ‘dovor shebekedusha” or holy articulation, in front of a woman who has her hair uncovered, including one’s own wife. (Mishna Berura ibid 1). Most Poskim follow this stringent ruling.
However, Aruch Hashulchan (O. H. 75: 7) mentions that in our days since many women don’t cover their heads, uncovered hair has ceased from being considered an “ervah” or nakedness, and is similar to the hair of unmarried women that is not prohibited. Igrois Moishe (O.H. 1: 42) in regards to the required height of a mechitza offers a similar lenient ruling in case of need. (See also Igrois Moishe O.H. 4: 15, and so do Ben Ish Chai, Or LeZion. et.al.).
Mishna Berura (ibid. 5), quoting Nishmas Adam, asserts that since this prohibition is only rabbinical, one may just close one’s eyes, when uttering “devarim shebekdusha.”
Whether the word “shalom” is considered an expression of holiness, Mishna Berura (85: 10) opines that if it is said as a greeting, it should not be mentioned in an unclean place such as a bathroom or bathhouse. However, Poskim are lenient on calling someone named Sholom by his name in such a place (Taz ibid, Birkei Yosef ibid. 9). Chayei Adam (3: 36) sugest to say the name incomplete as “shalo.”
Horav Shlomo Miller’s Shlit’a opinion is that indeed, in need one may greet a woman with uncovered hair using the word shalom, in need. Preferably, one should use another expression, the incomplete word, or close one’s eyes.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a