Its clear that in a bathroom or in a bathhouse, or room where people get undressed like a shower or areas like that, it would be forbidden in those places to say the name of Hashem in any capacity. Because since it’s a place where people are unrobed, and are involved in their personal needs, in such a place of impurity, one should not obviously mention the name of Hashem.
But it’s not so well known that the word Shalom, which we might interpret to mean as Peace, is one of the names of HaKadosh Baruch Hu. There’s a pasuk that says, ‘Vayikra Lo Hashem Shalom.’ From there we learn that Shalom is one of then names of Hashem.
So you have to be careful in the bathhouse, and in the Mikveh, if there are other people around not to say that word. We would say it, let’s say on a Friday, when you come out of the Mikveh, you might tell somebody Shabbat Shalom, and the word Shalom shouldn’t be said in the Mikveh. Unless, Chacham Ovadia is lenient, if that is the name of the person. There are people who have the name Shalom. Although, the Ben Ish Chai is stringent on this. He says even if the name of the person is Shalom, you shouldn’t mention it, but Chacham Ovadia is lenient on this.
For that matter the Ben Ish Chai is Machmir (stringent) in the Mikveh, in the bathhouse, where you shouldn’t say a name that has G-d’s name in it. For example, Abdallah, in Arabic, Abdallah, Allah is the name of G-d, or ‘Obadia’, it’s Hashem’s name. Chacham Ovadia is lenient on this also. That since this is a name and the intent is not to say Hashem’s name specifically, this would be OK.
But again, saying ‘Shalom Alechem’ as a salutation, as a greeting, it would be forbidden, or to again, to greet ‘Shabbat Shalom.’ I was once in the Mikveh in Deal, and on the way out the people said to each other, "SS." In the beginning I didn’t know what they were talking about. I thought it was a type of code word. So I asked one of the guys outside, and he said, Shabbat Shalom, its initials are ‘SS", so this would be the proper Minhag. So I figured to say back ‘SSU’, which would mean ‘Shabbat Shalom Umevorach’. In any event, that’s the subject regarding Shalom.