Brute Force Basic Authentication - PowerShell for Pentesters (PSSE)

Hey all!! This is my first blog post for the PowerShell for Pentesters exam. For the first task, we were assigned to craft a PowerShell cmdlet specifically designed for brute forcing basic authentication on web servers. The main design goals for this script was for maximum possible connection configurations (because I myself run some fairly nonstandard webservers behind basic authentication), hoping I could get the most utility out of this script as a general utility vs a high performance attack script. I've included this script in my PSSE collection, and because it was a single file, I've also embedded it below:

This blogpost has been created for completing the requirements of the SecurityTube PowerShell for Penetration Testers Certification Exam:
http://www.securitytube-training.com/online-courses/powershell-for-pentesters/
Student ID: PSP-3061