The AD Group Members module collects Active Directory group data for every managed instance.  For the most recent collection of members, use the view Collector.ADGroupMemberCurrent, which expands the latest collection of AD groups into their constituent members (AD logins and sub-groups).
 

Tables

Collector.ADGroupMember

Stores the collections of Active Directory group membership data.

 

ColumnTypeDescription
IDbigintPrimary key row identifier.
ExecutionDateTimedatetimeThe execution date and time, common to the run of a collection for a single instance.
GroupNamenvarcharThe name of the AD group.
ObjectNamenvarcharThe name of the AD group (same as GroupName), or of a member of group GroupName. Or, a special notifier for

Valid values:
Group or member name
Minion: Not found in AD 
Minion: Empty Group
IsGroupbitIndicates whether the record is a group, or not.
GroupMembervarcharNot currently in use.
LastLogondatetimeThe date and time at which the account last logged in (according to Active Directory).
BadLogonCountbigintA count of the number of bad login attempts for this account (that is, attempts with incorrect credentials).
PasswordNeverExpiresbitWhether the password expires for this account.
PasswordNotRequiredbitWhether the password is required for this account.
PermittedLogonTimesvarcharTimes when the account can logon.
PermittedWorkstationsvarcharThe list of workstations that the account can log in to.
LastPasswordSetdatetimeThe last date and time that the password was set for this account.
LastBadPasswordAttemptncharThe last date and time that a logon attempt was made using a bad password (for this account).
UserCannotChangePasswordncharWhether the user can change the password for this account.
DescriptionnvarcharDescription of the account.

(NOTE: Like almost everything else in this table, Description is collected from Active Directory, not assigned within Minion Enterprise.)
DelegationPermittedbitWhether the account may be delegated.
AccountExpirationDatedatetimeThe date and time the account will expire.
AccountLockoutTimedatetimeThe date and time the account was locked out.
EmailAddressnvarcharThe email address for this account.
EnabledbitWhether this account is enabled for authentication.
EmployeeIDnvarcharEmployee ID for the account user.
VoiceTelephoneNumbervarcharPhone number for the account user.
DistinguishedNamenvarcharThe distinguished name for the account user.
DisplayNamenvarcharThe display name for the account user.

Example: ‘Sean McCown’.
SurNamenvarcharThe surname (last name) for the account user.
MiddleNamenvarcharThe middle name for the account user.
GivenNamenvarcharThe given name (first name) for the account user.
NamenvarcharThe name for the account user.

Example: ‘Sean McCown’.
GUIDvarcharThe GUID associated with the the account.
SIDvarcharThe Security ID associated with the the account.
SmartcardLogonRequiredncharWhether a smartcard is required to log on to this account.
HomeDirectorynvarcharThe home directory for this account.
HomeDrivenvarcharThe home drive for this account.
AllowReversiblePasswordEncryptionBitWhether reversible password encryption is enabled for this account.

 


Special notes on the ObjectName column:

  • Minion: Not found in AD – If a Windows login exists in SQL Server, but doesn’t exist in Active Directory, it means that the entry has been removed from AD. Minion Enterprise specifically calls out so that DBAs can easily see when a login is no longer valid.
  • Minion: Empty Group – If a Windows group exists, but has no members, ME will show the group name as “Minion: Empty Group”.

 

Stored Procedures

 

Collector.ADGroupListGet

Returns a list of Active Directory groups from the Logins module table Collector.Logins.  The Logins module data gives Minion Enterprise a starting place to query Active Directory.


Warning: This procedure does not return a comprehensive list of all AD groups. The ADGroupsGet.exe script handles the recursive calls to make sure that nested AD groups are processed.


Important: This procedure is meant to be used by automated collectors; we recommend against using it manually. Therefore, the parameter set is only documented internally.

 

Collector.ADGroupMemberInsert

The script calls this procedure to perform the insert into the Collector.ADGroupMember table.


Important: This procedure is meant to be used by automated collectors; we recommend against using it manually. Therefore, the parameter set is only documented internally.

 

Report procedures

If you have Windows groups as logins in SQL Server, you traditionally have no idea who's in there, because you can't see into Active Directory groups.  


Now you can, and quite easily, with the following stored procedures:


Report.ADAcctsInSQLAll 

Gets an expanded list of Active Directory groups for all servers.


For more information, see the related article.


Report.ADAcctsInSQLByApp 

Gets an expanded list of Active Directory groups for a specific app. Parameter: @AppID (int). 


Report.ADAcctsInSQLByEnviro

Gets an expanded list of Active Directory groups for a specific environment. Parameter: @Enviro (varchar).


Report.ADAcctsInSQLByID

Gets an expanded list of Active Directory groups for a specific instance. Parameter: @ID (bigint).


Report.ADAcctsInSQLByServerName

Gets an expanded list of Active Directory groups for a specific server name. Parameter: @ServerName (sysname).


Report.ADAcctsInSQLBySLA

Gets an expanded list of Active Directory groups for a specific service level. Parameter: @ServiceLevel (varchar).

 

Views

 

Collector.ADGroupMemberCurrent

Provides the most recent collection of Active Directory group membership data.

Each “Current” view associated with a Collector table contains all (or nearly all) of the columns from the base table, plus a “ViewDesc” description column, and columns from dbo.Servers data:

  • ServerName
  • ServiceLevel
  • Version
  • Edition
  • Descr

 

Collector.ADGroupMemberPrevious

Provides the next-to-most recent collection of Active Directory group membership data.


Each “Previous” view associated with a Collector table contains all (or nearly all) of the columns from the base table, plus a “ViewDesc” description column, and columns from dbo.Servers data:

  • ServerName
  • ServiceLevel
  • Version
  • Edition
  • Descr

 

Jobs

 

CollectorADGroupsGet

Calls the executable ADGroupsGet.exe for all servers, to retrieve Active Directory group membership information.

 

Executables

 

ADGroupsGet.exe

Perform the AD group membership data collection for managed servers. Log the results to Collector.ADGroupMember.


Input parameters: MoreData.

The MoreData parameter specifies a number for the type of extra data you want to get back.

Normally, the collector only gets group members for groups that have users in SQL, but when you use this parameter you can get other users as well.

Below is the list of parameter values and the data they'll retrieve.

1 - Gets all users from the 'Domain Users' group in AD.  This will help with getting data for those windows users that have access directly into SQL.


Example execution:

Get default data

C:\MinionByMidnightDBA\Collector\ADGroupsGet.exe

 Get default data and domain users

C:\MinionByMidnightDBA\Collector\ADGroupsGet.exe 1

 

https://minionware.desk.com/customer/portal/articles/2572234-ad-group-members-module

http://www.MinionWare.net