18
Create Distribution Lists with RES Automation Manager 2011
Recently our colleague Anne Plancius visited one of our partners in The Netherlands and they wanted to allow their customers to create their own mailing lists, without making them Domain Administrator. So they concluded that they would like to use RES Automation Manager for this. Here’s Anne’s story how he managed to get it working.
Unfortunately this is not a predefined task yet, so it is not of the simplicity point, click, done. But then it starts to become a ‘battle between man and machine’, because it should be possible. And still I do not want to disturb our research and development organization with this. And, oh lucky me, with some help of Google, some support of Windows PowerShell and a tiny bit of me, I could solve it. This is how I did it:
The PowerShell commands are the result of a Google search and are meant for Exchange 2007. I have not tested them against Exchange 2010, but we could be lucky and they could work:
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
chdir “c:\program files\microsoft\exchange server\bin”
New-DistributionGroup -Name “Managers” -OrganizationalUnit “Contoso.com/Users” -SAMAccountName “Managers” -Type “Distribution”
To give the customer a bit more flexibility and to make it more understandable I have used parameters in RES Automation manager. In this manner I can use it to create different lists, possibly even for different customers:
groupname: which is the name of the distribution group you want to create
path in Active Directory: in which OU do you want to create the distribution group
This results in the following PowerShell code inside RES Automation Manager:
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
chdir “c:\program files\microsoft\exchange server\bin”
New-DistributionGroup -Name “$[groupname]“ -OrganizationalUnit “$[path in Active Directory]“ -SAMAccountName “$[groupname]“ -Type “Distribution”
This proves the power of PowerShell in combination with RES Automation Manager once again.