22 bird shot is my go to for non lethal deterrence at further distances. It gets their attention. You have to experiment out of your rifle at various distances on a beer can to see it’s effectiveness. Out of a revolver it won’t penetrate a can at 10ft. Out of a rifle it is more powerful. We have Pileated woodpeckers that are huge. Luckily they haven’t attacked my house. When they bang on a road sign it is loud. My wife is a birder and has a feeder close to the house with suet for the smaller woodpeckers. Maybe this diverts their attention from the house.