In this example we want to block all requests made by an annoying robot. Usually the robots are identified by their name contained in the "User-agent" HTTP header.
Configuration:
#Turn IIS Mod-Rewrite engine on
RewriteEngine On
#Check if "User-agent" HTTP header contains "AnnoyBot"...
RewriteCond %{HTTP_USER_AGENT} AnnoyBot [NC]
#...and if so, send a "Forbidden" HTTP header for any request.