Exchange 2007 address list using array and distinct
I am trying to get a distinct list of company names out of exchange 2007 powershell (with sql it would be select distinct). My eventual goal is to create a script to using an array to create address list in the GAL. Is it possible to get distinct information from powershell script. Thanks Steve
May 31st, 2010 10:26pm

Address lists are based on a query. To do that your script can select the recipients you want and then set some attribute to some value, such as Custom Attribute 15 to "Address-List-A", and then create the address list based on Custom Attribute 15 being equal to "Address-List-A". To make the script a bit more fancy, you could have it remove "AL-A" from recipients who don't match your criteria. Of course, if you just manually edit the recipients to have the value you want, you don't even need to create a script. -- Ed Crowley MVP "There are seldom good technological solutions to behavioral problems." . "Steve Hachborn" wrote in message news:e47db8cd-2907-4544-90ea-25ddcd064603... I am trying to get a distinct list of company names out of exchange 2007 powershell (with sql it would be select distinct). My eventual goal is to create a script to using an array to create address list in the GAL. Is it possible to get distinct information from powershell script. Thanks Steve Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Free Windows Admin Tool Kit Click here and download it now
June 1st, 2010 12:44am

Ed the reason why i am looking for a distinct company name, I would like to setup the outcome in a array so it would loop around and create the address list automatically running on a schedule. If powershell cannot do this i can create the output in a vbscript and pipe the results back into exchange powershell, hoping to stay with one language. Thanks Steve
June 1st, 2010 1:59am

Let me explain it again. An address list is different than a group. You can create an address list, but you can't create the membership. An address list's membership is based on an LDAP query (or filter). What you have to do is choose some attribute or combination of attributes and their values and specify that in the properties of the address list. What you can script is the value of the selection attributes in the members. -- Ed Crowley MVP "There are seldom good technological solutions to behavioral problems." . "Steve Hachborn" wrote in message news:85073576-b6cc-47e8-a64b-94774c58996c... Ed the reason why i am looking for a distinct company name, I would like to setup the outcome in a array so it would loop around and create the address list automatically running on a schedule. If powershell cannot do this i can create the output in a vbscript and pipe the results back into exchange powershell, hoping to stay with one language. Thanks Steve Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Free Windows Admin Tool Kit Click here and download it now
June 1st, 2010 3:27am

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

Other recent topics Other recent topics