In his sefer Chut Shani on Even HaEzer Siman 21, Rabbi Nissim Karelitz writes (page 59, note 16) the straight halacha that asking a woman how she is doing is forbidden even if you ask by means of the husband. Asking the husband how his wife is doing is permissible.
This is based on a Gemara in kiddushin 70a which says:
Later on, Rav Naḥman suggested: Let the Master send greetings of peace
to my wife Yalta. Rav Yehuda said to him: This is what Shmuel says: A
woman’s voice is considered nakedness, and one may not speak with her.
Rav Naḥman responded: It is possible to send your regards with a
messenger. Rav Yehuda said to him: This is what Shmuel says:One may
not send greetings to a woman even with a messenger, as this may cause
the messenger and the woman to relate to each other inappropriately.
Rav Naḥman countered by suggesting that he send his greetings with her
husband, which would remove all concerns. Rav Yehuda said to him: This
is what Shmuel says: One may not send greetings to a woman at all.
Yalta, his wife, who overheard that Rav Yehuda was getting the better
of the exchange, sent a message to him: Release him and conclude your
business with him, so that he not equate you with another ignoramus.
Tosfos d"h Ein shoalin beshalom isha klal asks a kasha that in Bava Metziah 87a the Gemara says:
“And they said to him: Where is Sarah your wife? And he said: Behold,
in the tent” (Genesis 18:9)... It is taught in the name of Rabbi
Yosei... the Torah is teaching derech eretz that a person should ask
about the welfare of their host. The Gemara then asks: But Shmuel says
that a person may not ask about the welfare of a woman at all!? The
Gemara then answers: By means of the husband is different and is, therefore,> permissible (and derech eretz).
Tosfos says that we see from Bava Metziah that a man can ask about the welfare of his hostess as long as it's through the husband! Tosfos answers that Bava Metziah is saying that a host can inquire about the welfare of his hostess from the husband, not that he is sending greetings or asking about the welfare of the hostess by means of the husband. Rabbi Karelitz says that the Tosfos in Bava Metziah which discusses the same point is saying the same thing as the Tosfos in Kiddushin.
Rabbi Yitzchak Yaakov Fuks in his book Halichos bein Adam LeChaveiro, Perek 1 Halacha 33 writes the same halacha. His sefer has haskamos from Rav Shlomo Zalman Auerbach, Rav Yosef Shalom Elyashiv, Rav Sheinberg, Rav Neventzal and other Chareidi poskim.