Dynamic Distribution Group using '-RecipientFilter' command
Okay, I am trying to create a custom dynamic distribution group using the command below. The syntax is taken basically verbose from the technet site. New-DynamicDistributionGroup -Name AllBaltimore -OrganizationalUnit gill-simpson.com/GSI Users RecipientFilter { ((RecipientType eq 'UserMailbox') and (Company eq 'Gill-Simpson, Inc.') and (Office eq 'Baltimore')) } However, I keep getting the following error message in the command shell... New-DynamicDistributionGroup : Cannot bind parameter 'RecipientFilter' to the target. Exception setting "RecipientFilter": """ is not a valid operator. For a list of supported operators see the command help. "((RecipientType -eq 'UserMailbox') -and (Company -eq 'Gill-Simpson, Inc.') -and (Office -eq 'Baltimore')) " at position 17." At line:1 char:112 + New-DynamicDistributionGroup -Name AllBaltimore -OrganizationalUnit gill-simpson.com/GSI Users -RecipientFilter <<<< { ((RecipientType-eq 'UserMailbox') -and (Company -eq 'Gill-Simpson, Inc.') -an Does anyone know why I'm getting this? I've searched all of microsoft but can't seem to find any solution that works.
November 6th, 2007 7:56pm

Have you looked here: http://technet.microsoft.com/en-us/library/aa996561.aspx I just tried this, and it seemed to work for me. Maybe leave out the full path to your OU? [PS] C:\Documents and Settings\administrator\Desktop>New-DynamicDistributionGroup -Name AllBaltimore -OrganizationalUnit gsiusers -RecipientFilter {((RecipientType -eq 'UserMailbox'))} Name ManagedBy ---- --------- AllBaltimore [PS] C:\Documents and Settings\administrator\Desktop>
Free Windows Admin Tool Kit Click here and download it now
November 6th, 2007 8:10pm

I tried running what you put in.....that also works for me; however, when I add the properties for 'Company' and 'Office' into the command it fails with the same error. The Property names are exactly what is listed on the filterable properties so I must have some other syntax issue. [PS] C:\Documents and Settings\melvoyzeyadmin1115\Desktop>New-DynamicDistributionGroup -Name AllBaltimore -OrganizationalUnit "GSI Users" -RecipientFilter {((RecipientType -eq 'UserMailbox'))} Name ManagedBy---- ---------AllBaltimore [PS] C:\Documents and Settings\melvoyzeyadmin1115\Desktop>New-DynamicDistributionGroup -Name AllbeBaltimore -OrganizationalUnit "GSI Users" -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (Company -eq 'Gill-Simpson, Inc.') -and (Office -eq 'Baltimore'))}New-DynamicDistributionGroup : Cannot bind parameter 'RecipientFilter' to the target. Exception setting "RecipientFilter": """ is not a valid operator. For a list of supported operators see the command help."((RecipientType -eq 'UserMailbox') -and (Company -eq 'Gill-Simpson, Inc.') -and (Office -eq 'Baltimore'))" at position 36."At line:1 char:99+ New-DynamicDistributionGroup -Name AllbeBaltimore -OrganizationalUnit "GSI Users" -RecipientFilter <<<< {((RecipientType -eq 'UserMailbox') -and (Company -eq 'Gill-Simpson, Inc.') -and (Office -eq'Baltimore'))}[PS] C:\Documents and Settings\melvoyzeyadmin1115\Desktop>
November 6th, 2007 8:53pm

Okay, I've narrowed it down to the fact that if I insert an -and operator into the statement if fails. Can anyone else create a group using the -and operator in the statement?
Free Windows Admin Tool Kit Click here and download it now
November 7th, 2007 3:58pm

This has been resolved by another source. The problem was in the syntax of the command. The original syntax was taken directly from Microsoft and TechNets online documentation and sample code. This however, is shown incorrectly on the site. The problem was in the use of parenthesis between the Company and Office attributes (see syntax above). For this to work from the command shell no parenthesis should be between these two attributes. The proper syntax is as follows: -RecipientFilter {((RecipientType -eq 'UserMailbox') -and ((company -eq 'Company' -and Office -eq 'Office')))} Hope this helps if anyone else has ran into this problem,
November 8th, 2007 8:37pm

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

Other recent topics Other recent topics