homeMDB customExpression

I worked with a case where I had to “calculate” which homeMDB users got depending on the first letter in their firstname in Exchange 2010. So, with a little help from people here (http://social.technet.microsoft.com/Forums/en-US/ilm2/threads) I came up with this outbound customExpression flow.

customeExpression:
IIF(Eq(Left(firstName,1),”A”),”CN=DB_A”,
IIF(Eq(Left(firstName,1),”B”),”CN=DB_B”,
IIF(Eq(Left(firstName,1),”C”),”CN=DB_C”,
IIF(Eq(Left(firstName,1),”D”),”CN=DB_D”,”CN=DB_else”))))

Concatenate

String:
,CN=Databases,CN=Exchange Administrative Group (etc),CN=Administrative Groups,CN=Exchange,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=fabrikam,DC=com

Hope this could help somebody!