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.”
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: