Here is a quick sample powershell script that you can adapt to your environment. This blocks the top 1,000 attack IPs risk level 5 in Windows firewall