Script to identify which AD accounts are no longer active Trying to get a script that will identify which AD accounts/Windows authentication on a SQL Server are no longer active.  Say perhaps an employee was released and the login would be removed from AD, but SQL Server still shows it in the logins.  

Any assistance would be great.
I'd highly recommend the dbachecks PS module which makes this (and pretty much every other important check) quite easy to run.

Running it is as simple as:

Invoke-DbcCheck -Checks ADUser -SqlInstance localhost