This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Uses Microsoft Log Parser (https://en.wikipedia.org/wiki/Logparser) to parse IIS logs for given criteria and both auto | |
blocks the IP in IIS (under IP Address and Domain Restrictions) and also reports to AbuseIPDB (IP Address Blacklist). | |
Modify site, dir & query variables to suit your specific site requirements. Run script in Task Scheduler every 15 mins. | |
Log Parser Component Object Model (COM) must be registered in Windows and script should be run with suitable permissions. | |
#> | |
$utc = (Get-Date).ToUniversalTime() |