August
5th,
2011
When you have worked with Exchange 2010 you might know that some things only can be configured by using the Exchange Management Shell (EMS). A few examples are:
- configuring relaying on a receive connector
- enable logging for IMAP and POP3
In some cases a hidden option is available in the Exchange Control Panel. In this serie of blogs we will have a look at these cmdlet’s and especially the parameters.
We start with the hidden features of distribution groups. These groups can be used to send a message to multiple people. In Exchange 2010 three parameters are available which can be used to define the name and location of the distribution group.
The parameters for this must be used i.c.w. the set-organizationconfig Powershell cmdlet:
DistributionGroupDefaultOU
As the name already tells you this parameter can be used to configure the default OU which is used to store the distribution groups. By using this parameter you can prevent that distribution groups will be created in multiple OU’s. For example we had an Active Directory called corp.local and we have created an OU Distribution Groups. To ensure that the new distribution groups will be stored in this OU we will need to use the following cmdlet:\
Set-OrganizationConfig -DistributionGroupDefaultOU ' corp.local/Distribution Groups'
Once configured all new distribution groups will be stored in this OU.
DistributionGroupNameBlockedWordsList
Using this parameter we can configure words which may not be used in names of distribution groups. This parameter may not work for all organizations. Before using this parameter make a correct inventory which words can’t be used. For example when we want to prevent the use of the words toys and computer as the name of a distribution group we will need to use the following cmdlet:
Set-OrganizationConfig -DistributionGroupNameBlockedWordsList toys,computer
This parameter can also be configured by using the Exchange Control Panel (ECP).
DistributionGroupNamingPolicy
Using this parameter we can configure the naming convention which will be applied when creating a distribution group. In this policy the following variables can be used:
- Department
- Company
- Office
- StateorProvince
- CountryorRegion
- CountryCode
- Title
- CustomAttribute1 tot CustomAttribute15
Let’s say we want all the names of distribution groups start with DG_ followed by the groupname en countrycode where we will split the last two by using an underscore:
Set-OrganizationConfig -DistributionGroupNamingPolicy 'DG_<GroupName><CountryCode>'
When a new group is created called support it will be automatically renamed to for example: DG_Support>NL@corp.local. Keep in mind that the e-mail address assigned to the distribution group might not be correct, this of coure depends on you e-mail address policy. In this case the e-mail address will be something like DG_support_NL@corp.local.
One remark must be made when using the earlier discussed variables. These values will be determined by copying the values from the user which creates the distribution groups.
This parameter can also be configured by using the ECP.
Combining parameters
Of course it’s also possible to combine the three parameters. In the following example we will configure the parameters as followed:
- all distribution groups will be created in an OU groups which is located in the OU demo
- all names of distribution groups need to start with DG_
- the word everyone may not be used
To configure this we will need to use the following cmdlet:
Set-OrganizationConfig -DistributionGroupDefaultOU 'corp.local/demo/groups' -DistributionGroupNamingPolicy 'DG_<GroupName>' -DistributionGroupNameBlockedWordsList everyone
When a new user is created using the EMC called demousers you will get the following result:
When a group is created by using the name everyone the following error will be displayed:
Here ends the first blog about the hidden features of Exchange 2010. In the next blog we will continue to have a look at the set-organizationconfig cmdlet and will have a look at which parameters may be very usefull for you.