Views:

Applies To:

GroupID 10 - Management Shell

Business Case:

At times, groups are created from GroupID as non-mail-enabled, and you want to mail-enable them in bulk. This article explains how you can do that using GroupID Management Shell.

Methodology:

Create a CSV file containing the display names of groups that you want to mail-enable. Then establish a connection remotely with Exchange to mail-enable the groups mentioned in that CSV.

Steps:

  1. List the names of all groups that you want to mail-enable in a CSV file. In the example here, the display name attribute is used for listing, but you can use any attribute as long as it uniquely identifies a group in Exchange.

  2. Launch GroupID Management Shell.

  3. You will need to establish a remote connection with Exchange. Make sure the messaging system is connected in identity store settings and then run these commands one by one:

    $UserCredential = Get-Credential (Provide your service account credentials in the window. Use the Domain\Service Account format)
     
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<FQDN of Exchnage server>/PowerShell/ -Authentication Kerberos -Credential $UserCredential
     
    Import-PSSession $Session -DisableNameChecking

    After the last command is entered, GroupID Management Shell should be connected to Exchange remotely via the messaging system service account:

  4. For mail-enabling the groups, use the following command:

    Import-Csv "C:\Groups.csv" | ForEach-Object {Enable-DistributionGroup -Identity $_.Display_Name}

    This command imports the groups' display names from the CSV file, named Groups, (saved on the C drive) and mail-enables them in Exchange. In case you are using any other attribute in the CSV file, replace identity with the column heading of that attribute.

    On successful run, it will show you a success message for each group getting mail-enabled.

Note: It is recommended to follow this procedure on some test groups first. If the results are as expected, apply this method on critical production groups.