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 5:09pm
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 25th, 2008 1:50am
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 27th, 2008 6:50am
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 8: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 28th, 2008 5:14am
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 10: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 12:07pm
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 10:00pm