Yaleh Veyavo in Shemoneh Esrei:
A. The general laws:
On Rosh Chodesh one adds the paragraph of Yaleh Viyavo within Shemoneh Esrei of Maariv, Shacharis and Mincha. It is recited after Ritzei [prior to Modim].
Announcing Yaleh Veyavo before Shemoneh Esrei: One may not announce prior to Shemoneh Esrei of Maariv [and certainly of Shacharis] that the paragraph of Yaleh Veyavo is to be said in Shemoneh Esrei. [Nevertheless upon the Chazan reaching Yaleh Veyavo he is to recite these words aloud.]
B. Forgot to say Yaleh Veyavo:
By Maariv: If one forgot to say Yaleh Veyavo within Maariv Shemoneh Esrei he fulfills his obligation and is hence not required to repeat the Amidah. [Nevertheless after he finishes Shemoneh Esrei he is allowed to repeat the Shemoneh Esrei as a Nedava.] This applies for the Maariv prayer of all nights of Rosh Chodesh, whether Rosh Chodesh is one day and whether Rosh Chodesh is two days. If prior to finishing Shemoneh Esrei one remembered that he did not say Yaleh Veyavo, then if he is holding prior to saying the name of Hashem in the concluding blessing of Visechezena, then he should say it as soon as he remembers and continue afterwards from Visechezena. If however he already said Hashem’s name in the concluding blessing of Visechezenu then he should continue regularly from there.
 Michaber ibid
 Siddur Admur; Sefer Haminhagim p. 69 [English]; Rashal brought in Kaf Hachaim 236/16; Ketzos Hashulchan 27/5
Other opinions: Some Poskim rule Yaleh Veyavo may be announced prior to Shemoneh Esrei of Maariv, after Kaddish. It is not considered an interval being it is done for a need of the prayer. [Michaber 236/2 based on Rashba 293; Bach; Levush Abudarham; M”A 236/1; M”B 236/7; 422/1; Derech Hachaim 33/81] However prior to Shemoneh Esrei of Shacharis according to all it is forbidden to announce Yaleh Veyavo. [Derech Hachaim ibid]
 Kaf Hachaim ibid; See also Rashal ibid
 Michaber ibid
 The reason: The reason for this is because the month is never sanctified at night. [Michaber ibid] Thus the holiness of Rosh Chodesh was never applied to the night. This applies for both nights of Rosh Chodesh as both nights of Rosh Chodesh are simply a doubt of the real day of Rosh Chodesh. [M”B 422/3]
 M”B 422/2; Admur 294/7 regarding Veata Chonantanu
 Rama ibid; Admur ibid regarding Veata Chonantanu; M”B 422/2
 Rama ibid; M”B 422/2; Admur 294/7 regarding Veata Chonantanu