How to create a custom attribute?
I've read several documents on what custom attributes are in an Exchange 2007 mailbox, but i've yet to find anything that explains exactly how to create one. Here's what i'd like to do... Create new dynamic distributionlists where members are automatically added based on their home server location. So, if an account and mailbox is created on our Singapore Exchange server (for example), that mailbox would automatically be part of the "All Singapore" DL. Do i just type in "ServerName=SingExchange"??? All help is appreciated. jim
September 5th, 2008 6:25pm

Hello Jim, You can create a DDL for a server with filtering recipient for a server... New-DynamicDistributionGroup "YourGroupName" -RecipientFilter {ServerName -eq "Your Server Name"} -RecipientContainer "YourDomain.com/Users" -RequireSenderAuthenticationEnabled $false Reference: New-DynamicDistributionGroup
Free Windows Admin Tool Kit Click here and download it now
September 5th, 2008 7:05pm

Cool, thanks. This will do me for now, but i'd still like to know about creating custom attributes. jim
September 5th, 2008 7:14pm

Wehave 15 custom attributes in Exchange 2007,we candefine the valuesat the general tab of any receipient.... Recipient Properties > General Tab > Custom Attributes
Free Windows Admin Tool Kit Click here and download it now
September 5th, 2008 7:35pm

That page doesn't say how it would work functionally. It just says that you can do it, but doesn't say how and in whatsituation. I mean, what would i type in one of those fields, and then how would use it once it's typed in? On a different note, can i add more than one server name in the powershell command? For instance, if i want to create a dynamic DL called "All Asia" that contained mailboxes that were on either our Taiwan Exchange server, Korean Exchange server, or China Exchange server.
September 5th, 2008 9:50pm

In the recipient filter you can add multiple servers -RecipientFilter {((ServerName -eq "Your Server Name") -or (ServerName -eq "Your Server Name2) -or (ServerName -eq "Your Server Name3")..) -and -not (Name -like "SystemMailbox{*")} In same way you can add a filter for15 different custom attributes which helps you to build better query for yor DDL, check below article Filterable Properties for the -RecipientFilter Parameter in Exchange 2007 SP1 You can view the members of DDL in this way... How to View Members of a Dynamic Distribution Group
Free Windows Admin Tool Kit Click here and download it now
September 5th, 2008 10:13pm

Didn't work. [PS] C:\>New-DynamicDistributionGroup "#All Asia" -RecipientFilter {((ServerName-eq "Server1") -or (ServerName -eq "Server2") -or (ServerName -eq "Server3")) -and -not (Name -like "SystemMailbox{*")} New-DynamicDistributionGroup : Cannot bind parameter 'RecipientFilter' to the target. Exception setting "RecipientFilter": "Invalid filter syntax. For a description of the filter parameter syntax see the command help. "((ServerName -eq "Server1") -or (ServerName -eq "Server2") -or (ServerName -eq"Server3")) -and -not (Name -like "SystemMailbox{*")" at position 81." At line:1 char:58+ New-DynamicDistributionGroup "#All Asia" -RecipientFilter <<<< {((ServerName-eq "Server1") -or (ServerName -eq "Server2") -or (ServerName -eq "Server3")) -and -not (Name -like "SystemMailbox{*")}
September 5th, 2008 10:26pm

Okay I just tested and correct syntax is here.... New-DynamicDistributionGroup "#All Asia" -RecipientFilter {(ServerName -eq 'Server1' -or ServerName -eq 'Server2' ..... )} -RecipientContainer "YourDomain.com/Users" -RequireSenderAuthenticationEnabled $false No need to add filter to exclude system mailbox, Exchange will filter it automatically.
Free Windows Admin Tool Kit Click here and download it now
September 5th, 2008 10:48pm

It dumped me to a ">>" prompt, but didn't create the group.
September 5th, 2008 10:54pm

Never mind, my bad. I left out a single quote. Thanks again!
Free Windows Admin Tool Kit Click here and download it now
September 5th, 2008 10:55pm

Cool... My Pleasure...
September 5th, 2008 10:57pm

New question, same subject... So i created the dynamic DL using this recipient filter: (ServerName -eq 'KREX' -and -not(Name -like 'SystemMailbox{*') -and -not(Name -like 'CAS_{*')) When i click on the 'preview' button it does show all the mailboxes homed on KREX. However, when i send a message to it, nothing is delivered. I checked the tracking logs and the message was sent. Does the filter only apply to new accounts? I thought it worked on existing mailboxes too.
Free Windows Admin Tool Kit Click here and download it now
September 9th, 2008 5:56pm

I think i've got it figured out.. The DDL needs to be in the same recipient container as the accounts it's filtering for. Am i understanding that right? It only started working when i changed the container of the DDL and only on the filterable mailboxes in that container. I'm not sure i understand why it would be that way, especially when the 'preview' button shows ALL the mailboxes i would've expected it to be delivered to (that is, mailboxes that exist inside the container and out.) Weird.
September 9th, 2008 6:49pm

Oh, wait, it just needs to be in the same container or a parent container/OU. When i originally created it, it was in a separate OU. Hmmm. Lesson learned i suppose.
Free Windows Admin Tool Kit Click here and download it now
September 9th, 2008 7:36pm

Hi, Yes, by default the scope of your filter is the OU where you created your DDL. You really need to add RecipientContainer Domain.com while creating DDL to define extended scop of filter for whole domain. Description of RecipientContainer parameter: The RecipientContainer parameter filters the recipients that are used to build the dynamic distribution group based on their location in ActiveDirectory. The value of RecipientContainer can be the canonical name of an organizational unit (OU) or a domain. If you do not specify a value for RecipientContainer, the default search filter is the location of the dynamic distribution group in ActiveDirectory. This location is specified by using the OrganizationalUnit parameter. Here are some of the references, worth to read aboutDDL How to Create a New Dynamic Distribution Group How to View Members of a Dynamic Distribution Group New-DynamicDistributionGroup Hope this helps...
September 10th, 2008 5:07am

Amit and the group, I hope this is the correct way to join in on an existing issue. My issue is that I don't want the entire domain in my query, I want to select every mailbox in a sub OU. I tried to set the RecipientContainer with the entire canonical name but it always resolves to the eitire domain. We are running Exchange 2010 SP1. Bill
Free Windows Admin Tool Kit Click here and download it now
April 19th, 2011 3:06pm

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

Other recent topics Other recent topics