Using RecipientContainer with New-AddressList cmdlet
Hi I've been trying to use the RecipientContainer filter property (not parameter) in the RecipientFilter property of the New-AddressList cmdlet. An example: New-AddressList -DisplayName "Test" -Name "Sentraladministrasjoen" -RecipientFilter {(RecipientContainer -eq "OU=test,OU=users,DC=dom,DC=dom2,DC=no")} This command completes successfully, and I can apply it with the Update-AddressList cmdlet. But if I try to use the Preview button in EMC the MMC snap in crashes with this error: Cannot convert value "dom.dom2.no/users/test" to type "Microsoft.Exchange.Data.Directory.ADObjectId". Error: "The string "dom.dom2.no/users/test" does not represent a valid distinguished name." As you can see I supply the DN in the cmdlet, which is then converted to a CN in the filter. If I try to create the address list with a CN, it fails with the same error as EMC does. Anyone know how to use the RecipientContainer filter property in this manner, or where I am going wrong? Maybe there is another way to set the search root of an address list filter? Morgan
August 21st, 2008 10:09am

I looked at this for a long time today and am wondering if this is even possible when creating an Address List. I sent an e-mail along to some other MVPs that might know the definitive answer. If this is supposed to work and it is an EMS-only option, then the Preview feature in the EMC may not understand how to generate the query, so that is another factor here.
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2008 6:50pm

Hi Morgan, I have local tested the command and I can reproduced your issue. At first, I think the issue occurs that the Distinguished Name was converted to the CN. Thus, I replace the eq by using like, the Distinguished Name will not be converted after that. Nevertheless, even if I use like or manually modify the msExchQueryFilter attribute of the Address List to use Distinguish Name, I cannot get the users in the preview list (The EMC does not crash this time). Then, I use another method to check the issue. I added some users to a group and create address list by using the following command: New-AddressList -Name "XXXX" -RecipientFilter {(Memberofgroup -eq "CN=group,OU=test,DC=domain ")} When using EMS to preview the addresslist, the EMC crashed again with the same error. Nevertheless, if I change the eq to like or modify the msExchQueryFilter attribute to use Distinguish Name, the users in the group can be viewed by the preview feature. Therefore, I think there are two issues here: 1. The DN is converted to CN if we use eq (Note: we are still able to view the Address List by using Outlook. We just fail to use preview feature) 2. The RecipientContainer Property does not work Nevertheless, I do not find any documents regarding the issue currently. Mike
August 26th, 2008 11:50pm

I did not get a chance to test this on my test system. Did this actually work for you? Someone from Microsoft told me that this filter should work, but the Preview option in the Exchange Management Console would most certainly not work. I was just curious if you created the Address List and then if it showed up properly in Outlook and OWA?
Free Windows Admin Tool Kit Click here and download it now
August 27th, 2008 1:30am

If I create RecipientFilter with memberofgroup property, it works in Outlook but failed in preview with receiving the same error (does not represent a valid distinguished name) Nevertheless, if I create RecipientFilter with RecipientContainer property, the address list in Outlook is empty and the preview feature failed with the same error. Thus, as I indicated in the previous post, it is actually two issues here: 1. The DN is converted to CN which causes the preview feature failed. Nevertheless, it should not affect the address list in Outlook. 2. The RecipientContainer filter property does not work. Mike
August 27th, 2008 10:14pm

Hi guys Nice to see a lot of interest in this issue :-) Mike: Do you have a chance to escalate this to the product team? As you say, it appears to be a bug. Morgan
Free Windows Admin Tool Kit Click here and download it now
August 28th, 2008 3:47am

Hi Morgan, I am sorry that I have no permission to escalate issue. I suggest that you submit a case regarding the issue and have the support engineer to check whether it is a known product issue. Mike
August 28th, 2008 5:07am

Hi guys Just thought I would update the thread with the conclusion. I escalated the case to Microsoft PSS and this is what they told me: It is impossible to create an address list with users from an OUMeaning you cannot have an address list whose filter is something like "all users in the domain.com/CompanyX and below". Too bad, since that was what I was trying to do. Anyone else missing this feature? (And by the way; no, you cannot filter on distinguished name.) The use of the RecipientContainer property inside the RecipientFilter parameter is not supported/possible even though it is listed as valid. If you examine the documentation carefully (or more carefully that I did, anyway) you will see that the OPATH property RecipientFilter actually maps to the LDAP attribute msExchDynamicDLBaseDN (http://technet.microsoft.com/en-us/library/bb430771(EXCHG.80).aspx) The crash in EMC when using the preview button is a bug and will be fixed in Rollup 5The problem is that the path to the container is translated into a CN, even though the cmdlet requires you to use DN. You can work around this by using ADSIEDIT and manually changing the msExchQueryFilter attribute of your address list back to the correct DN syntax. So there you have it. Morgan
Free Windows Admin Tool Kit Click here and download it now
September 16th, 2008 3:00pm

Here is my workaround to your issue that "The use of the RecipientContainer property inside the RecipientFilter parameter is not supported/possible even though it is listed as valid. If you examine the documentation carefully (or more carefully that I did, anyway) you will see that the OPATH property RecipientFilter actually maps to the " First create multiple address lists based on each OU you wish your overall address list to filter on, setting the RecipientContainer (not in the filter) with a single value for the OU. Then create an overall address list using AddressListMembership as the filter. Finally if you don't want the OU based address lists showing up in Outlook use ADSI edit to set the permissions on them so they are hidden. You can use the powershell command Get-AddressList -Identity "ListNameHere" | fl DistinguishedName to get the distinguished names of the OU based address lists for your filter then build the filter as so. set-AddressList -DisplayName 'Combined List' -Name 'Combined List' -RecipientFilter {((AddressListMembership eq 'CN=Some List,CN=APAC,CN=All Address Lists,CN=Address Lists Container,CN=INT,CN=Microsoft Exchange,CN=Services,CN= Configuration,DC=domain') or (AddressListMembership -eq 'CN=Some List 2,CN=APAC,CN=All Address Lists,CN=Address Lists Container,CN=INT,CN=Microsoft Exchange,CN=Services,CN= Configuration,DC=domain'))}-Identity '\Combined List' Hilighted in red are the bits you want to change using the discovered DNs etc. You can then set the permissions on the OU lists by using ADSI edit to open configuration and navigate to CN=Configuration,DC=<your domain> > CN=Services > CN=Microsoft Exchange > CN=<your exchange> > CN=Address Lists Container > CN=All Address Lists > CN=<your Address Lists> There is a good guide here on setting the permisions:- http://markswinkels.nl/2009/10/how-to-hide-address-lists-in-exchange-2010/ Cheers Dave
March 23rd, 2012 8:26am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics