How to create distribution groups in Exchange 2010 with non mail-enabled admin accounts
Back after some holidays I’ve sat on my desk and started dealing with our brand new Microsoft Exchange 2010 (non-SP1 yet) console. I’ve noticed that when you try to create distribution or security groups (I had some pending to create) from Microsoft Exchange 2010 management console with a non mail-enabled account (i.e. my domain admin account) the process fails with the following error.
Couldn’t find object “AdminUserAccount”. Please make sure that it was spelled correctly or specify a different object. Reason: The recipient “AdminUserAccount” isn’t the expected type.
Exchange Management Shell command attempted:
new-DistributionGroup -Name ’test1’ -Type ‘Distribution’ –OrganizationalUnit “NewDistributionGroup” -SamAccountName ’test1’ -Alias ’test1’
The reason for this is that when creating a distribution group, Exchange tries to add the mailbox of the admin user as the manager of the distribution group and usually the admin account that creates the distribution groups will not be mailbox enabled.
To overcome this you can use the New-DistributionGroup cmdlet with the ManagedBy parameter; here you have an example:
new-DistributionGroup -Name ’test1’ -Type ‘Security’ –OrganizationalUnit “NewDistributionGroup” -SamAccountName ’test1’ -Alias ’test1’ –ManagedBy ‘MailboxEnabledAccount’
That’s it, the cmdlet works like a charm and you got your ditribution/security groups created in less than a second. I’ve not been able to find this written by Microsoft but as usual you can check Microsoft TechNet’s links below for your reference: