Q: Finding Active Directory Group/Roles Assigned on Multiple SQL Servers I have been searching the internet trying to find anything in relevance to this and I have fallen short.  I am trying to find a way to query multiple SQL servers and search for a specific Active Directory Group and the roles it is assigned on that server.  
If anyone has any ideas if this is possible; could you point me in the right direction or a link that maybe I have missed. 
Thanks

A: Below script will help you ... using Powershell, you can run it against multiple servers.
Based on your need, you can modify the script.
SELECT  
  [srvprin].[name] [server_principal], 
  [srvprin].[type_desc] [principal_type], 
  [srvperm].[permission_name], 
  [srvperm].[state_desc]  
FROM [sys].[server_permissions] srvperm 
  INNER JOIN [sys].[server_principals] srvprin 
    ON [srvperm].[grantee_principal_id] = [srvprin].[principal_id] 
WHERE [srvprin].[type] IN ('S', 'U', 'G') and [srvprin].[type_desc] like 'WINDOWS%' 
ORDER BY [server_principal], [permission_name]; 
go


CREATE TABLE #ADMembership
(account_name SYSNAME,
 [type] NVARCHAR(10),
 privilege NVARCHAR(10),
 mapped_login_name NVARCHAR(max),
 permission_path NVARCHAR(max))

DECLARE @login SYSNAME;
SET @login = SUSER_SNAME();

INSERT INTO #ADMembership
EXEC XP_LOGININFO @login,'ALL';

-- select the data or do what ever u want ...
SELECT * FROM #ADMembership;
-- clean up
DROP TABLE #AdMembership

