In our environment there are many SQL servers and many AD ids are there as SQL logins.
If an id deleted from AD then it stays in SQL server as a orphaned login.
I need to cleanup those ids from SQL servers. Now I need a query to validate the user exist in AD or not.
Or Please share if any other way to do it.
Thanks in advance!!