Identify areas where birds are pecking. Woodpeckers are drawn to siding, eaves, window frames and trim. They prefer cedar and redwood, but will drill into pine, cypress, fir and other types of wood with natural or stained finishes, which they prefer over paint.
Place lightweight plastic netting over the entire area the birds are pecking. Use a fine-gauge mesh of at least ¾ inch. Leave a 3-inch space between the netting and the building to prevent the birds from pecking, and poking, through it.
Attach the mesh to the eave or roof overhang and secure it to the building siding. Pull the netting fairly tight and secure it so the birds can't get underneath. This can be left in place for an extended period of time and is nearly invisible.
Repel the birds with additional netting if they move to another area of the building.
Add repellants such as artificial hawks or owls to help keep the birds away. Aluminum foil or metal flashing can also serve this purpose.
Repair any holes in the wood once the birds are gone. Woodpeckers will return to places where they have drilled holes.