Pigeons are a nuisance to homeowners and, even worse, can be a health hazard. Their droppings are unsanitary and may lead to respiratory issues if inhaled, especially in the young, elderly and those with weakened immune systems. They often carry pests like fleas and mites that can infiltrate your home. Once pigeons have found a safe refuge like a window ledge they are likely to remain, so it is best to repel them early on -- before they are used to congregating on your ledge.
Purchase a plastic owl from a hardware or home goods store. Owls are natural predators, and pigeons are instinctively afraid of them. Mount the owl on your ledge in a visible location. If necessary, hang it from the rafter or eave with fishing line or other sturdy string or wire. Move the owl around every couple of days if possible to fool the pigeons into thinking it is real.
Apply petroleum jelly to the window ledge using a plastic knife or craft stick to spread it around. When the pigeons land in the petroleum jelly they won't like the sticky feel of the ointment and will seek out a less hostile refuge. Reapply the petroleum jelly as needed; rain and extreme temperatures will result in the need for additional applications.
Take a piece of plywood and drive nails through the bottom with a hammer to create a makeshift spike strip. Space the nails closely together, no more than 2 inches apart. The size of the nails isn't important, so long as they protrude through the plywood. Lay your spike strip down on the ledge, and pigeons will quickly learn not to land on it.
Hang shiny, reflective objects like compact discs or aluminium foil from the eaves or rafters using fishing line. When blowing in the wind, such objects often frighten pigeons away.
Cover your window ledge with a fine mesh chicken wire or similar netting. Secure in place with nails or duct tape to prevent it from falling or blowing away. The pigeons will learn they cannot land there, and will move on.
Window ledges are often high up off the ground. Exercise caution when using ladders, and never stand on rungs too close to the top.