Skip to main content

Query to show the members of the BUILTIN\Administrators group

When checking out who has what permissions to a SQL Server or database you often see that BUILTIN\Administrators has sysadmins. To quickly find out the membership of the group run this bit of code:

EXEC xp_logininfo 'BUILTIN\Administrators' ,'members'

This piece of code is ideal for a Snippet.


Comments