Inspect the problem area for anything that may be attracting birds. Birds are often attracted to shiny, reflective materials. They often nest and perch in areas that provide food, water, shade and shelter. Remove anything from the ledge that may be attracting birds and encouraging them to return.
Explore deterrent methods that would work best for the area that you're trying to stop birds from perching on. There are solutions available which you pour onto the ledge that give off an unpleasant smell to the birds and make the surface sticky, quickly turning it into an area that birds will avoid. You may purchase fake predators such as large rubber snakes or plastic owls to scare away the birds. There are also invisible netting and electrical strips available to deter birds from perching in areas where they're unwanted.
Install your selected deterrent in the problem area by following the directions on the method you chose. Sticky gels are often placed on the ledge to make the area uncomfortable for birds to sit, while netting can be an almost invisible way to prevent birds from landing on the ledge at all. If you choose the decoy method, ensure that the owl, snakes or other predator is placed in direct view on the ledge.
Check and rearrange your deterrent every few days. If you chose to use the predator method by placing a plastic owl or rubber snakes on the ledge, you should move them every few days to keep birds away. If the decoys don't move every few days, birds may take up residence in that area again. If birds start returning to the ledge, you may have a problem with your current deterrent system or you may wish to try an alternative method since not all methods work on all bird species.