Our Sages explain that a berachah is not merely a perfunctory obligation. When we recite the words: “He who sanctified us with His commandments,” we are striving to uplift ourselves to connect with the spirituality of the act we are about to perform. In this sense, the berachah breathes more soul into the physical body of the mitzvah.
Moreover, the berachah focuses our hearts and minds on the reality that what we are about to perform is a fulfillment of the Divine will, and it publicizes that belief to all who hear its words.
If you did not make the berachah before affixing the mezuzah, many authorities rule that you may not make one afterwards. Nevertheless, if you are still involved in adjusting the position of the mezuzah, you may still make a berachah.  Of course, if you are going to be putting up another mezuzah at the time, when you make the berachah on that one, you can have the first mezuzah in mind as well. Alternatively, you can take this mezuzah down and put a different one in its place with a berachah.
These are the preferred procedures. However, many authorities allow a blessing to be recited in the following ways:
Some write that when the time comes to do the periodic check to see if the mezuzah is still kosher, one may remove the mezuzah for that purpose and afterward replace it with a berachah.
Still others opine that since the mitzvah continues to be fulfilled passively even after the act of placement, a berachah may still be made. According to this opinion, one may simply put one’s hand on the mezuzah and make a berachah, even long after its original placement.
 Ritva, Pesachim 7b.
 Agur B’ohalecha 7:5, citing Shach 286:25; Aruch HaShulchan 286:24; Sha’arei HaMezuzah, citing oral ruling of Shevet HaLevi.
 Agur B’ohalecha 7:5.
 Agur B’ohalecha 7:7.
 Sha’arei HaMezuzah 17:18, citing Yabia Omer 8:27.
 Igros Moshe 1:179.