Test-DbaWindowsLogin
Stephen Bennett, sqlnotesfromtheunderground.wordpress.com | Chrissy LeMaire (@cl)
Test-DbaWindowsLogin View Source Stephen Bennett, sqlnotesfromtheunderground.wordpress.com , Chrissy LeMaire (@cl) Windows, Linux, macOS Synopsis Validates Windows logins and groups in SQL Server against Active Directory to identify orphaned, disabled, or problematic accounts Description Queries SQL Server for all Windows-based logins and groups, then validates each against Active Directory to identify security issues and cleanup opportunities. The function checks whether AD accounts still exist, are enabled, and match their SQL Server SID to detect orphaned logins from domain migrations or account deletions.
Read more
dbatools