From: Webb on
Hi,
I have staff who work in multiple departments and I'm looking at setting up
address lists that will show the department members and also have those that
work in multiple departments listed under each of the relevant lists.

I can see no way of setting up the lists to use group membership so I
thought we would be able to populate the department field with
Finance\Payroll (Finance being 1 department and payroll another) and then
use the following command to set up the relevant lists:

New-AddressList -Name "Payroll" -RecipientFilter {((RecipientType -eq
'UserMailbox') -and (Department -match 'Payroll'))}

New-AddressList -Name "Finance" -RecipientFilter {((RecipientType -eq
'UserMailbox') -and (Department -match 'Finance'))}

But this gives the following error:

New-AddressList : Cannot bind parameter 'RecipientFilter' to the target.
Exception setting "RecipientFilter": ""-match" is not a valid operator. For a
list of supported operators see the command help.

Any help much appreciated.
From: Tushar Shah on
On Jun 19, 2:31 pm, Webb <W...(a)discussions.microsoft.com> wrote:
> Hi,
> I have staff who work in multiple departments and I'm looking at setting up
> address lists that will show the department members and also have those that
> work in multiple departments listed under each of the relevant lists.
>
> I can see no way of setting up the lists to use group membership so I
> thought we would be able to populate the department field with
> Finance\Payroll (Finance being 1 department and payroll another)  and then
> use the following command to set up the relevant lists:
>
> New-AddressList -Name "Payroll" -RecipientFilter {((RecipientType -eq
> 'UserMailbox') -and (Department -match 'Payroll'))}
>
> New-AddressList -Name "Finance" -RecipientFilter {((RecipientType -eq
> 'UserMailbox') -and (Department -match 'Finance'))}
>
> But this gives the following error:
>
> New-AddressList : Cannot bind parameter 'RecipientFilter' to the target.
> Exception setting "RecipientFilter": ""-match" is not a valid operator. For a
> list of supported operators see the command help.
>
> Any help much appreciated.

the error itself states -match is not valid, why dont u use -eq
instead of -match and see if that works
From: Webb on
Thanks for the reply, alas using -eq would mean that all possible
combinations of cross departmental working would have to be listed which in
an organisation this size would be unmanagable.

"Tushar Shah" wrote:

> On Jun 19, 2:31 pm, Webb <W...(a)discussions.microsoft.com> wrote:
> > Hi,
> > I have staff who work in multiple departments and I'm looking at setting up
> > address lists that will show the department members and also have those that
> > work in multiple departments listed under each of the relevant lists.
> >
> > I can see no way of setting up the lists to use group membership so I
> > thought we would be able to populate the department field with
> > Finance\Payroll (Finance being 1 department and payroll another) and then
> > use the following command to set up the relevant lists:
> >
> > New-AddressList -Name "Payroll" -RecipientFilter {((RecipientType -eq
> > 'UserMailbox') -and (Department -match 'Payroll'))}
> >
> > New-AddressList -Name "Finance" -RecipientFilter {((RecipientType -eq
> > 'UserMailbox') -and (Department -match 'Finance'))}
> >
> > But this gives the following error:
> >
> > New-AddressList : Cannot bind parameter 'RecipientFilter' to the target.
> > Exception setting "RecipientFilter": ""-match" is not a valid operator. For a
> > list of supported operators see the command help.
> >
> > Any help much appreciated.
>
> the error itself states -match is not valid, why dont u use -eq
> instead of -match and see if that works
>

As -eq does not meet my requirements, I would have to create lists of every
possible combination which in this organization would be unmanagable. The
use of -match or a group