Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Error message in Exchange Management Shell in Microsoft Exchange Server 2007 when you run the "new-dynamicdistributiongroup" command: �You must provide a value expression on the right-hand side of the '-and' operator.�


View products that this article applies to.

Symptoms

You can use Dynamic Distribution Group (DDG) in a Microsoft Exchange Server 2007 environment. You can create a DDG in Exchange Management Console (EMC) or in Exchange Management Shell (EMS). If the filter is complex, you must create the DDG in EMS. You can create the DDG by using the new-dynamicdistributiongroup command together with -RecipientFilter parameters. However, if you have more than one -and statement in a row, the RecipientFilter value is written as an invalid filter.

For example, you create a DDG that is named "testDDG" in EMS by using the following command:
New-dynamicdistributiongroup testDDG -RecipientFilter {((Alias -ne $null) -and (customattribute4 -eq 'active') -and (c -eq 'us'))}
Then, you locate the filter by using the EMC, or by using the following command:
get-dynamicdistributiongroup testDDG | fl RecipientFilter
After you run this command, the following filter is returned:
 (((Alias -ne $null -and
		  CustomAttribute4 -eq 'active') -and C -eq 'us') -and -not(Name -like
		  'SystemMailbox {*') -and -not(Name -like 'CAS_{*'))
To obtain the preview recipient list, you run the following command together with the filter that you obtained in the previous step:
get-recipient -RecipientPreviewFilter <the filter>
When you run this command, you do not receive the expected recipient list. Instead, you receive the following error message
You must provide a value expression on the right-hand side of the '-and' operator.

↑ Back to the top


Cause

This issue occurs because the filter parser misses a required separator.

↑ Back to the top


Resolution

To resolve this problem, install Update Rollup 1 for Exchange 2007 Service Pack 2.
971534 Description of Update Rollup 1 for Exchange Server Service Pack 2

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: KB973490, kbsurveynew, kbhotfixrollup, kbexpertiseinter, kbfix, kbqfe

↑ Back to the top

Article Info
Article ID : 973490
Revision : 1
Created on : 11/19/2009
Published on : 11/19/2009
Exists online : False
Views : 429