Attic bats are simply a nuisance. Once you have a few they can quickly grow into a colony and will need to be dealt with. But while they are pests, bats are also animals that need protection. The solution is not to harm or kill the bats but rather to keep them away from your attic.
Before you embark on the project first ascertain the vastness of the colony and the period in which all the bats, including those born after the maternity period, will be capable of flying. When you are sure that all the bats are capable of flight, install a valve, ideally a one-way exit, through which the bats will fly out, but will be unable to make their way back in. This device has been endorsed as safe by Bat Conservation International.
The best defense against bats is to block entry into your attic. As you can’t be sure exactly how they're getting in, you need to plug all the possible entrances. The rule of thumb is to seal up all passages that exceed an inch, which means that once out the bat can’t come back in. Use hardware cloth to to seal off the ridge, louver and attic vents as well as the chimney inlets. Leave no fissure that the attic bats can breach.
Ridge vents are a common entry point for attic bats. Damaged or warped ridge vents needs to be replaced. Rodents have been known to chew into such ridge vents and in doing so have created entries for the attic bats. Rather than constantly trying to seal successive entries you’d be better off having a new ridge vent installed. This time around make sure the ridge vent is bat proof. To do so, first remove the old ridge vent and line the area with hardware cloth before installing the new one. The ridge vent can then be secured by nailing in cap shingles. Now you've sealed off one of the most common entry points.