Views:

Applies To:

GroupID 10 – GroupID Management Shell

Business Scenario:

We have created a large number of Smart Groups using GroupID and we want to export the groups that are using an external data source for membership data.

More Information:

Sometimes we combine an external data source with the directory to determine a group's membership. The external data source can be a Microsoft SQL database, ODBC data source, Oracle, text files, and more. Settings related to the external data source are defined on the ‘Advanced’ tab of the Query Designer. We can export these type of groups using a GroupID Management Shell command.

Steps:

Follow these steps to bulk export the Smart Groups having an external data source.

  1. Launch GroupID Management Shell.

  2. Type the following commandlet to bulk export all the groups having an external data source.

    Get-Object -AttributesToLoad "samAccountName","imsggroupidstatement","imsgkeymapprovider","imsgkeymapdb", "imsggroupidconnectionstring" -LdapFilter "(imsggroupidconnectionstring=*)" | select samAccountName, imsggroupidstatement, imsgkeymapprovider, imsgkeymapdb, imsggroupidconnectionstring | Export-Csv C:\externalsourcegroups.csv -NoTypeInformation

    This commandlet will export samAccountName, connection string, command query and mapping attributes of groups to a CSV file.

    The cmdlet saves your CSV file to the C:\ directory with the name, externalsourcegroups.csv. To change the directory, add your desired directory in place of C:\externalsourcegroups.csv.

    We can also limit this query to export groups having an ODBC connection, SQL, or CSV/txt.

  3. For groups having ODBC as a source, use the following query.
     
    Get-Object -AttributesToLoad "samAccountName","imsggroupidstatement","imsgkeymapprovider","imsgkeymapdb", "imsggroupidconnectionstring" -LdapFilter "(imsggroupidconnectionstring=DSN*)" | select samAccountName, imsggroupidstatement, imsgkeymapprovider, imsgkeymapdb, imsggroupidconnectionstring | Export-Csv C:\odbcgroups.csv -NoTypeInformation
  • For SQL database groups, use (imsggroupidconnectionstring=Data*) in the LDAP filter.
  • For CSV or .txt file based groups, use (imsggroupidconnectionstring=Driver*) in the LDAP filter.

You can get more information by appending the desired attributes to the cmdlet (for example SearchContainer, Identity, imsgobjectType, etc.).

Reference:

GroupID Management Shell User Guide

Comments (0)