You can take simple measures to prevent bats from entering your home and colonizing. One idea is to put up a bat house outside of your home. By doing this, you are providing a place for the bats to roost other than your attic or cellar. The Organization for Bat Conservation has bat houses available, as do various home-improvement retailers. Observe from the outside for a few nights before putting up the bat house to find out where the bats are entering your home. Place the bat house in close proximity to their entry point, so they will get accustomed to going into their own home instead of yours. Bat houses can be mounted on the side of your house, to a pole or in a tree.
Once you have located where the bats are entering the home, seal off any cracks or holes in that location. Be certain that no bats are inside prior to sealing off entry points, so not to trap them inside of your home. Bats can enter through very tiny spaces so any opening that is larger than a quarter-inch by a half-inch must be sealed. Additionally, install window screens, draft protectors below doors (especially those leading to where bats may colonize), and chimneys caps and fill all electrical and plumbing holes to prevent further entry points.
If there are possible entry points that you absolutely cannot seal off, try to make the area look as unappealing as possible to the bats. Mount lights, hang wind chimes or balloons, or anything else that will brighten up the area and make it appear full of activity. Although this may not be aesthetically appealing to humans, bats will look for a more desirable place to take up residence.
If you find just one bat inside of your home, chances are it flew in by accident and no colony is present inside the home. Open as many doors and windows that lead from the room where the bat is to the outside as you can and close any adjoining doors. The bat will likely fly out on its own. If it does not and it lands, use caution when capturing it. Put on heavyweight work gloves to avoid injury, and get a small container or a coffee can. Cautiously walk towards the bat, place the container over it, and slide a piece of cardboard underneath the container. If you are positive the bat has had no contact with a person, you can take it outside and set it free. If there is any question that someone may have been in contact with the bat, secure the cardboard to the can, using heavy-duty tape and poke some holes in the cardboard, so the bat can breathe. Call your local animal-control agency to retrieve the bat to have it tested for rabies.
Never swat at bats with objects such as brooms or bats. This will only make the bat defensive and increase the likelihood of it biting. If you are bitten by a bat, contact your local health department and doctor immediately to seek treatment for a possible rabies infection.