Concluding with “Ufros Sukas Shalom” on Maariv of Friday night or Yom Tov?
In the blessing of Hashkiveinu [said during Maariv of Friday night and Yom Tov] one is not to conclude with the regular Nusach of “Shomer Amo Yisrael La’ad,” but rather with “Haporeis Sukkas Shalom Aleinu Veal Kol Amo Yisrael Veal Yerushalayim.”
What is the law if one accidently concluded with “Shomer Es Amo Yisrael La’ad” instead of “Hapores Sukas Shalom” on Friday night or Yom Tov?
If he remembered within Kdei Dibbur, he is to recite the correct conclusion of “Hapores Sukas Shalom Aleinu.” If he did not remember within enough time, he nevertheless fulfills his obligation, and is not to repeat the blessing. Nonetheless, after Davening, it is proper to repeat the words “Hapores Sukkas Shalom Aleinu” without Hashem’s name.
 Admur 267:5; Michaber 267:3; Tur 267 in name of Midrash; Kol Bo 38; Pardes of Rashi 3 in name of Rav Haiy Gaon; Zohar Parshas Vayakehl 205a; Zohar Chadash 1 48; 2 205
 Kol Bo ibid; Levush 487; Zohar Pinchas p. 256; Shaar Hakolel 17:22 that so was custom of Admur
 The reason: As the Jewish people do not require guarding on Shabbos, as the Shabbos itself protects us [and hence we do not mention the regular Nusach of Shomer]. [Admur ibid; Taz 267:1; Tur 267 in name of Midrash; Zohar ibid; Kaf Hachaim 267:8] The reason for this is because on Shabbos, the Shabbos spirit banishes all evil spirits and all of the bad prosecuting beings, and there is hence no longer a need to pray for guarding. The Jewish people get surrounded by the “Sukkas Shalom” and it protects them. [Zohar ibid, brought in Kaf Hachaim ibid] Alternatively, it is the new soul who protects us. [Shaar Hakolel ibid] Alternatively, according to Kabala, the acceptance of the new Shabbos soul is dependent on the recital of this wording of “Uferos Aleinu”, and hence we recite it before Shemoneh Esrei as the concluding blessing. [Shaar Hakavanos p. 69; Peri Eitz Chaim 18:12; See Shalmei Tzibur p. 194; Shaareiy Teshuvah 267:2; Kaf Hachaim 267:9 and 11]
 M”B 267:9
 Kol Bo 35; Elya Raba 267:7; M”B 267:9; Kaf Hachaim 267:9; Piskeiy Teshuvos 267:4
The reason: As there are communities who even initially recite the regular weekday Nussach. [Kol Bo ibid that Reb Shalom Gaon stated that in the Yeshiva they recite the regular Nussach; See Pardes of Rashi 3 in name of Rav Haiy Gaon, brought in Shaar Hakolel 17:22]
 Kaf Hachaim ibid
The reason: This is due to reasons of Kabala, as explained in Shaar Hakavanos p. 69