The script is available for download from https://gallery.technet.microsoft.com//How-to-find-the-location-64db1fbe. You can also use Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment.
This PowerShell script shows how to find the location of a locked out user account in domain.
There are many reasons causing accounts to be locked out. The user has logged onto another machine, and not logged off. Then, if the user has changed their password while the other machine is logged in, it could be requesting resources using the old (and now incorrect) password. Every time it tries to get a network resource that requires authentication it will cause a bad password attempt. This script can scan where the location of a locked out user account is.
You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery