Go to any grocery store and buy alot of ammonia jugs. I usually buy about 10-12 jugs. Ammonia is cheap, it wont hurt your purse or wallet. The amount of ammonia jugs will be used up over a 3 night period. The amount of pens depends on how many jugs you buy, just make sure you have enough ammonia jugs for 3 nights use.
You'll need one 5 gallon bucket and then put a bunch of rags in the bucket. Pour 2-3 jugs of ammonia in the bucket in order to completely soak the rags.
Do this procedure after your chickens have gone inside the coop for the night, lock them up. No birds should be outside the coop at night while using ammonia. Do this procedure just after dark. Also remove feeders so that rats wont eat the feed.
Wear disposable gloves and a mask. Take the 5 gallon bucket containing the ammonia soaked rags with you and hang the soaked rags on the OUTSIDE on the pen(s), on the chicken wire. Hang them so that they do not touch the ground, but just a couple of inches above the ground vertically. They should be dripping ammonia, do not wring them out.
(Try not to breathe in the ammonia fumes).
I hang the soaked ammonia rags about every 5 feet all the way around the pens on the chicken wire to get good coverage. You can use clothespins if you wish or just stick it through the chicken wire, just as long as they dont fall on the ground.
Do NOT hang ammonia soaked rags near any coop vents. Keep in mind what direction the wind is blowing. I always hang the soaked rags when there isnt any wind, they are more effective and last longer throughout the night into the next morning because the wind doesnt dry out the rags.
The next morning, remove all the rags from the chicken wire. Dispose of any leftover ammonia in the 5 gallon bucket and put the rags in the bucket for re-use that night and the next night, 3 nights total. Then you can let the chickens out of the coops.
Once you've done this, repeat this procedure the next two nights.
The rats' nose are very sensitive and ammonia fumes severely burn the tissue. They flee from the area. However, there is always one hard headed rat that has to hang around for free food.
The hard headed rat will either have sucuumed to the ammonia fumes or took off and wont be back, because they know what's waiting for them.
It's wise to continue to inspect the pens for rat poop. I do it each morning before letting the birds out.