sp_validatelogins
The system stored procedure sp_validatelogins returns a list of logins in an SQL Server instance that no longer exists in the windows environment, for instance in the AD or on the local computer.
The list of orphaned users can be useful in a couple of scenarios.