Windows are present in nearly every building, from schools, to restaurants, to apartment blocks. During the zombie apocalypse, windows will pose a serious threat because they can be easily broken by zombies or other survivors. However, you can overcome this threat by barricading windows.
Using wooden planks
This method is mostly scene in movies, probably because it is the easiest to barricade a window using wooden planks. This will only work if the frame, or wall around the window is not metal, because it it's metal, then the nails won't go through. Against slow zombies this is a good idea because they are less energetic and vicious, but infected zombies (fast zombies) will find it a lot easier to break through wooden planks because they are usually pumping with adrenaline. Spikes could also potentioally be stuck through the planks to injure the zombies if they tried to tear off the planks.
Using metal rods or long strips
This method is by far, a lot better than using wooden planks, but this will be a lot harder. The easiest way to get the metal rods on the windows is to weld them on. This will be a lot easier if the wall around the window is metal, if not, then its still possible, but a MIG welder will be needed, because MIG welders can connect non-metals to metals with a copper wire that melts and connects the non-metal to the metal.