×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Global Address List Segregation with multiple conditions

Global Address List Segregation with multiple conditions

Global Address List Segregation with multiple conditions

(OP)
Hi guys,
I'm trying to create a second Global Address list that only contains 2 things. Mailboxes from my domain (not including external contacts that have been made into custom address lists), and also any distribution groups.

I have tried several comands, which all "complete", but show no members.

I've tried this, with all Mailboxes listed with "MyCompany" in the company parameter, and including Distribution Groups.

CODE

New-GlobalAddressList -Name "NEW GAL" -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (Company -eq 'MyCompany')) -or (RecipientType -eq 'MailUniversalDistributionGroup')} 

I have tried this, by specifying "MyCompany" as the value of CustomAtribute1

CODE

New-GlobalAddressList -Name "NEW GAL" -ConitionalCustomAttribute1 "MyCompany" -IncludedRecipients AllRecipients 

I have tried many bits of this, even just using a new GAL with just include all ditribution groups, and none of them work.

The only thing I can get to return values is

CODE

New-GlobalAddressList -Name "NEW GAL" -ConditionalCompany "MyCompany" -IncludedRecipients MailboxUsers 

This would be fine, if I could also add any distribution group that exists to this GAL.

This is driving me nuts.

thanks in advance

Neil J Cotton

RE: Global Address List Segregation with multiple conditions

(OP)
I've cracked it. Very strange. Seems to be a problem with the ASCII character inputs. Even though the text in the custom attributes is correct (identical and spelt correctly compared to the PS condition), it only seems to work when I copy the text from the actual line of PS, or build the PS script using a COPY and PASTE of the content of the attribute.

I know this doesn't sound possible, but I do recall having exactly the same problem with another PS scripting issue I had a while back.

If anyone can explain this, or have had a similar issue I would be very greatful.

FYI. This is the code that worked (after I replaced the CustomAttribute1 with a copy and paste of the content of the PS script condition.

CODE

New-GlobalAddressList -Name "AGCCE GAL7" -ConditionalCustomAttribute1 MyCompany -IncludedRecipients AllRecipients 

Neil J Cotton

RE: Global Address List Segregation with multiple conditions

Thanks for letting us know what resolved it. I have had this happen to me too, although in a different context. Very strange.

Dave Shackelford
ThirdTier.net

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close