Access Logins
Verify access to many SQL Server instances
There may come a day where you need to verify you have access to connect to a SQL Server instance. Perhaps you need to verify this access for a hundred or maybe even a thousand servers. Doing this by hand is not great and you’re going to want to capture what you did and did not have access to. This PowerShell script will help you accomplish that.
I took the majority of the script from SQL Shack which was written by Shawn Melton, so thank you for saving me a lot of the leg work Shawn! The rest of the tweaking I did was to create files / overwrite files, append a try-catch, and make the script easily executable with variables.