Finding a DL's home server

I'm trying to write a VBS that will add mailboxes to 
Distribution Lists, based on the CSV file from a 
Directory Export.
I'm having troubles because in order to ADD a mailbox, 
you need to use the DL's home server in the LDAP 
ADsPath.  This is not required if you only want to READ a 
property of the DL.

For example,
Let's say that the DL, 'DL-Office', is on Server1 which 
is in another Site. Say Server2 is local to me.
If I just want to know how many members there are in 'DL-
Office' I can do the following:
strDL="LDAP://Server2/cn=DL-Office,cn=DLs,ou=City,o=ORG1"
Set oDL = GetObject(strDL)
wscript.echo oDL.Members.Count

This works no problem, even though the DL is on Server1, 
I can query Server2 to find out the number of members.
However, if I want to add a mailbox, the LDAP string must 
use the DL's home server, in this case, Server1.

Sooo... my dilemma is I need to look up this property for 
the DL, but I can't seem to be able to find out how.  
There is an ability to do this very thing for a Mailbox, 
using Get("Home-MDB"), but this doesn't work for a DL.
My script will add the mailbox to multiple DLs which are 
on different servers, that's why I need to be able to 
look this up; to be able to connect to the proper one in 
order to add the Mailbox.

Anyone have any ideas???

It would be very appreciated, thanks.
Michael
0
anonymous (74722)
11/27/2003 7:58:44 PM
exchange.admin 57650 articles. 2 followers. Follow

2 Replies
305 Views

Similar Articles

[PageSpeed] 55

Groups dont get Home-MDB.  DLs aren't homed.

Users are tied to Groups with a multi-value system attribute called
"memberOf" on the user itself.  This is a backlink from the DL's "member"
multi-value attribute which is not a system attribute.  If you simply add
the DN of the user to the DL's member attribute--that mailbox will become a
member of that group.  I hope this helps--it should just be a string PutEx.
.......

const ADS_PROPERTY_APPEND = 3
....
  set objUser = GetObject("LDAP://" & szDLDN)
  objUser.PutEx ADS_PROPERTY_APPEND, "member", Array(szUserDN)
  objUser.SetInfo

....etc

-- 
Dan Winter, MCSE
Microsoft Exchange Support

Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.

"MichaelS" <anonymous@discussions.microsoft.com> wrote in message
news:009001c3b520$dcb05370$a501280a@phx.gbl...
> I'm trying to write a VBS that will add mailboxes to
> Distribution Lists, based on the CSV file from a
> Directory Export.
> I'm having troubles because in order to ADD a mailbox,
> you need to use the DL's home server in the LDAP
> ADsPath.  This is not required if you only want to READ a
> property of the DL.
>
> For example,
> Let's say that the DL, 'DL-Office', is on Server1 which
> is in another Site. Say Server2 is local to me.
> If I just want to know how many members there are in 'DL-
> Office' I can do the following:
> strDL="LDAP://Server2/cn=DL-Office,cn=DLs,ou=City,o=ORG1"
> Set oDL = GetObject(strDL)
> wscript.echo oDL.Members.Count
>
> This works no problem, even though the DL is on Server1,
> I can query Server2 to find out the number of members.
> However, if I want to add a mailbox, the LDAP string must
> use the DL's home server, in this case, Server1.
>
> Sooo... my dilemma is I need to look up this property for
> the DL, but I can't seem to be able to find out how.
> There is an ability to do this very thing for a Mailbox,
> using Get("Home-MDB"), but this doesn't work for a DL.
> My script will add the mailbox to multiple DLs which are
> on different servers, that's why I need to be able to
> look this up; to be able to connect to the proper one in
> order to add the Mailbox.
>
> Anyone have any ideas???
>
> It would be very appreciated, thanks.
> Michael


0
dwinter (26)
11/28/2003 12:41:50 PM
Thanks very much for your reply.  However, I've found 
that when I add the mailbox to the DL using your 
technique, I still have to specify the server that the DL 
was created on.
I.E. continuing my previous example..
I tried this first:
'-----------------
Const ADS_PROPERTY_APPEND = 3
szDLDN = "cn=DL-Office,cn=DLs,ou=City,o=ORG1"
szUserDN = "cn=User1,cn=Office,ou=City,o=ORG1"
set objUser = GetObject("LDAP://" & szDLDN)
objUser.PutEx ADS_PROPERTY_APPEND,"member",Array(szUserDN)
objUser.SetInfo
'-----------------
and got the following error:
"An operations error occurred.  Code:80072020"

Then I tried adding my local server (Server2):
'-----------------
Const ADS_PROPERTY_APPEND = 3
szDLDN = "Server2/cn=DL-Office,cn=DLs,ou=City,o=ORG1"
szUserDN = "cn=User1,cn=Office,ou=City,o=ORG1"
set objUser = GetObject("LDAP://" & szDLDN)
objUser.PutEx ADS_PROPERTY_APPEND,"member",Array(szUserDN)
objUser.SetInfo
'-----------------
and got this error:
"There is no such object on the server.  Code:80072030"

Finally, I changed the server to the DL's 'home' server 
(Server1):
'-----------------
Const ADS_PROPERTY_APPEND = 3
szDLDN = "Server1/cn=DL-Office,cn=DLs,ou=City,o=ORG1"
szUserDN = "cn=User1,cn=Office,ou=City,o=ORG1"
set objUser = GetObject("LDAP://" & szDLDN)
objUser.PutEx ADS_PROPERTY_APPEND,"member",Array(szUserDN)
objUser.SetInfo
'-----------------
Which worked...

It looks like, in order for my script to work, I either 
need to find out the server that the DL was created on 
(the 'home' server), or use another method that does not 
require the server.
I didn't mention this originally, but the servers are 
Exchange 5.5, if that makes any difference.

Michael

>-----Original Message-----
>Groups dont get Home-MDB.  DLs aren't homed.
>
>Users are tied to Groups with a multi-value system 
attribute called
>"memberOf" on the user itself.  This is a backlink from 
the DL's "member"
>multi-value attribute which is not a system attribute.  
If you simply add
>the DN of the user to the DL's member attribute--that 
mailbox will become a
>member of that group.  I hope this helps--it should just 
be a string PutEx.
>.......
>
>const ADS_PROPERTY_APPEND = 3
>....
>  set objUser = GetObject("LDAP://" & szDLDN)
>  objUser.PutEx ADS_PROPERTY_APPEND, "member", Array
(szUserDN)
>  objUser.SetInfo
>
>....etc
>
>-- 
>Dan Winter, MCSE
>Microsoft Exchange Support
>
>Please do not send email directly to this alias. This 
alias is for newsgroup
>purposes only.
>This posting is provided "AS IS" with no warranties, and 
confers no rights.
>
>"MichaelS" <anonymous@discussions.microsoft.com> wrote 
in message
>news:009001c3b520$dcb05370$a501280a@phx.gbl...
>> I'm trying to write a VBS that will add mailboxes to
>> Distribution Lists, based on the CSV file from a
>> Directory Export.
>> I'm having troubles because in order to ADD a mailbox,
>> you need to use the DL's home server in the LDAP
>> ADsPath.  This is not required if you only want to 
READ a
>> property of the DL.
>>
>> For example,
>> Let's say that the DL, 'DL-Office', is on Server1 which
>> is in another Site. Say Server2 is local to me.
>> If I just want to know how many members there are 
in 'DL-
>> Office' I can do the following:
>> strDL="LDAP://Server2/cn=DL-
Office,cn=DLs,ou=City,o=ORG1"
>> Set oDL = GetObject(strDL)
>> wscript.echo oDL.Members.Count
>>
>> This works no problem, even though the DL is on 
Server1,
>> I can query Server2 to find out the number of members.
>> However, if I want to add a mailbox, the LDAP string 
must
>> use the DL's home server, in this case, Server1.
>>
>> Sooo... my dilemma is I need to look up this property 
for
>> the DL, but I can't seem to be able to find out how.
>> There is an ability to do this very thing for a 
Mailbox,
>> using Get("Home-MDB"), but this doesn't work for a DL.
>> My script will add the mailbox to multiple DLs which 
are
>> on different servers, that's why I need to be able to
>> look this up; to be able to connect to the proper one 
in
>> order to add the Mailbox.
>>
>> Anyone have any ideas???
>>
>> It would be very appreciated, thanks.
>> Michael
>
>
>.
>
0
anonymous (74722)
11/28/2003 6:50:42 PM
Reply:

Similar Artilces:

Outlook Profiles When Using a Terminal Server
We have created a Terminal Server, Windows 2003 Enterprise 32bit, and have installed Office 2003 on it. Office was installed in Application mode and then SP3 for Office 2003 was installed. The problem: When a user logs onto the terminal server, the Outlook profile is not automatically connecting to the user's mailbox. Can anyone tell me whether or not this is normal behavior, or where I might be able to find more information so that I can get this resolved? -- Thanks, John your description of the problem is way to vague, please tell us EXACTLY what happens when you ...

Can't open word file with password: "can't find encryption code"
I have a word file with a password and encrypted used to open in word 2003 with the compatibility pack as the file was created in another pc in word 2007. Now, after installing office 2007, can't open that file: it says can't find the encryption code or source. Thank you. ...

How do I find the series associated with a given legend entry.
I have a problem, whereby I need to find the association between a legend entry and a chart series (in order that I can do something with the legend entry for a specific series if it exists). I cannot find a way to establish a firm link between a series and its legend, for instance: The chart has 5 series. The legend had 5 series but the user (or something/somebody) deleted 2 of these legend entries so there are 3 legend entries. So, at this point lets say I have code which has a specific series in its hand: Excel.Series series = _chart.Series(3); And with this series I want to del...

Use 2 or consolidate in 1 mailbox server
Currently I have roughly 2,700 mailboxes. About 1,350 distributed onto two Exch 2000 mailbox servers, 2 CPU. Would it be a good idea consolidate this on 4 Proc, single Exch 2003 Server ? Estimated growth is roughly 15% of mailbox for the next three years. If I go with one single mailbox, I think I could save money and use the hardware to buy an identical server to do cluster. ...

Possible to Include a Link to a Server in Email?
Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Email Client: Exchange I would like to send a link to my team that takes them to a folder on a server. I know how to do this in Outlook, I type this in my email &quot;\\server name\folder\&quot; <br><br>This, however, doesn't work for Entourage users. Is there a way to make this work in Entourage? On 3/10/10 3:32 PM, kc27@officeformac.com wrote: > I would like to send a link to my team that takes them to a folder on > a server. I know how to do this in Outlook, I type this in my e...

How to find merged records?
How to find merged inactive records with advanced find? Or do I need to use e.g. workflow to put those to special marketing list? If I'm understand right, those merged inactive record I can delete and still save the data that is copied to active record. Merged information is anyway on opened form "The record was merged with the X recrd, and then deactivated." but it is too much work to open all inactivated records (~50000) Jukka Majander Hi, Have a look at this post: http://crmdude.wordpress.com/2009/09/28/modifying-views-outside-microsoft-crm/. Shafraz -- Visit my bl...

CRM SQL 2005 Report Server
I've installed CRM with SQL 2005 on a SBS Server. The report server is connected and configured properly I believe however I can not get the default "canned" reports to display. If I use sql 2000 the default reports work great. Is there anyway I can get the report server to read the CRM default reports? I've read how to creat and modify the reports but could not find where the default report files are and where they should be for the report server to pick them up. thanks, Kirkdogg My guess is after upgrading your SQL reporting service, none of the canned reports...

I can't find my hidden emails
How do I retrieve my hidden email folder. I have windows mail using vista version. To see your storage location, Open Windows Mail, go to Tools - Options - Advanced - Maintenance - Store Folder It's normally C:\Users\<yourlogin>\AppData\Local\Microsoft\Windows Mail \Appdata is normally hidden Email messages are stored as individual .eml files. -- Dave N. MS-MVP (Mail) Windows 7 Ultimate http://download.live.com/wlmail "Hatsoff" <Hatsoff@discussions.microsoft.com> wrote in message news:2301FECC-9C1B-4051-BECC-E59087654D5E@microsoft.com.....

SQL Server 2005 Compatibility Level 80 to 90
Hello, I would just like to know whether there are implications on changing the compatibility of the SQL Server (2005) from level 80 to 90? We are on version 10 of Dynamics GP. And in terms of changing the level to we need to do it across the system databases as well (master, model, etc)? TIA timber Changing the compatibiltiy level will only impact your ODBC connection, since you will have to switch from your current SQL Server ODBC driver to SQL Server Native Client, which is only supported by SQL Server 2005. Microsoft Dynamics GP 10 has been optimized for SQL Server 2005 so you ...

Compare two lists of data to find new entries
I currently run a daily report from a CRM database to monitor my sales teams activities with customers. Each activity has a 'unique' reference. My aim is to compare the report (which is in excel) from one day with the new report to show the new 'activities'. In simple terms I want to say if activity 'x' is in the new list the show the information from that row on a new worksheet so I can see at a glance the new activities. How about an alternative? Insert a new column near that unique reference (say column B is inserted and column A is the unique reference). T...

Server 2008: WinSxS Folder
Hi, Does anyone know of a Server 2008 utility to clear out the WinSxS folder? On many of our 2008 Servers, this folder has grown to a very large size, almost 10GB on average. On one 2008 SP1 server here, the WinSxS directory is 10GB and the total Windows directory size is about 16GB; but the partition is only 20GB. We tried installing SP2, but it requires at least 5GB of free space to install. 20GB is within MS published requirements for a 2008 installation. 20GB partition + 16GB Windows Directory + 10GB WinSxS Directory + 5GB Free Space Needed = SCREWED! Any help woul...

Upgrade from Exchange 2000 to Exchange server 2003
I currently running Exchange 2000 server in a one domain forest. We have one Windows server 2003 DC and three windows 2000 server DC. The Windows Server 2003 is the FSMO. All DCs are GC. The Exchange 2000 Server is running on a member server and on Windows 2000 server OS. I want to upgrade to Windows Server 2003, what is the best way to do this? I have a new server installed with Windows Server 2003 as a member server. I am thinking of installing the Exchange server 2003 on this box. What is the best approach to upgrade the Exchange Server to 2003. sounds like a good idea; instal...

Service Pack 1 for server 2003, broke my Exchange
I have an exchange server here and I believe my problem to be more on the networking side. After updating to Service Pack 1 for server 2003 I notice that I am loosing connectivity on one of the subnets that the server has. Now I know it's the correct thing to do, but the server was configured with two IP Addresses from two different subnets; 10.0.0.0/24 and 192.168.1.0/24. This was done so that the office on the 10.0.0.0/24 network could talk to exchange and do their tasks. The 192.168.1.0/24 Address was added to allow email to be sent from the outside world to the exchange serve...

Replicated account for a different domain
Hard for me to figure out how to properly ask this question. I have a user on an Exchange 5.5 server. They want to use a WM5 device now. We have a 2003 server for another domain in the company. We may eventually migrate all their mailboxes to the 2003 server but it will be a couple of months away. I was thinking perhaps we could use some sort of rule to continuously copy all their e-mail, contacts and calendar onto another e-mail account so they could at least get real time data on the PDA. Perhaps there is a way to set up just one e-mail address of the other domain on this exchange...

Finding the three smallest numbers
Hi NG I can find the smallest number in a range by using SMALL, fx =SMALL(A1:A10;1) and so on, but how can I find the smallest value, that are not 0. If I have the following numbers, 0, 1, 2, 0, 0.5, 0, 9, 2, 0, 1 I like this result =SMALL(range;1) = 0.5 Small(range;2) = 1, Small(range;3) = 1 Jan Are your numbers always non-negative? If yes: =SMALL(A1:A10,1+COUNTIF(A1:A10,0)) =SMALL(A1:A10,2+COUNTIF(A1:A10,0)) =SMALL(A1:A10,3+COUNTIF(A1:A10,0)) If you can have negative numbers: =SMALL(IF(A1:A10<>0,A1:A10),1) =SMALL(IF(A1:A10<>0,A1:A10),2) .... This is an array formula. ...

Where to find Business Contact Manager?
Hi all, I have a network with Small Business Server 2003 and I installed Office Pro 2003 on the clients (I think the Outlook 2003 was installed as part of the client setup from the server). How do I get BCM? Thanks I don't believe you can use BCM if you're using Exchange....corrections welcome. What is it you're trying to use in it? There may be other/better options... Dave wrote: > Hi all, > > I have a network with Small Business Server 2003 and I > installed Office Pro 2003 on the clients (I think the > Outlook 2003 was installed as part of the client setu...

ISA server
I want to make a connection with ISA server , How can i use ISAPI classes to do that ? if not, is there another way to connect to ISA sever with MFC? ...

virtual smtp server
hello newsgroup, we are using a managed email service for spam filtering and virus scanning. in outbound direction i configured a smarthost on the smtp connector with the adresspace " *.* " i was recommended from our provider to setup a second virtual smtp server for this outbound smtp traffic to the smarthost. when i do so, and point the connector to the new virt smtp server ,i always get the notice ,that relaying to external addresses isn´t possible. any ideas ,what should be wrong at this configuration ? thanks in advance stephan ...

Orphaned Domains Need New Home
Hello, I've been researching and think I've found the solution in rendom.exe. However, I was wondering if anyone has heard of a better solution. I have an orphaned domain that I really don't want to have to demote and recreate. I was creating a domain forest from our central office. Based on our environment though, someone else controls the routers and the ACL's. After a year and noticing that they kept closing ports that I needed opened without telling I think my best solution is to just make each of those domains thier own forest and create trusts between then. Is there...

CRM 3.0 Authentication Error on CRM Server with Admin rights
I'm preparing to upgrade to CRM 4.0 and I've decided to reinstall this office as new environment. Server 1 is our domain controller. I've reinstalled the SBS2003 Server and updated to SP2 and all other updates. Server 2 is our SQL and CRM 3 server. On this server I've reinstalled Win2K3 Server for CRM and SQL and applied all SP's. On this server, I installed SQL2000 Ent Ed. and applied SP4 On this server, I installed MS-CRM 3.0 and Update Rollup 2 with no errors encountered. After doing all this, on the CRM Server I tried to access the CRM webpage, after a few second...

Finding Characters
Hi MVP's and other smart people, I have a column of data (A1 thru A11500) with names or addresses etc. I would like to know if there is a way to display "Delete" or similar in the adjacent cell in the same row but the next column (B1 thru B11500) where any particular cell in column 'A' contains certain characters amongst the data within that cell. I have done this many times using the 'IF' formula when it necessarily matched the entire cell contents but it's only 1 or 2 characters contained within the contents of each cell that I need to match this time. Ho...

Outlooks 2003 connection probs w/ Exchange server 2003
Hello, I need some assistance. I have researched and researched but can't get some resolve on this problem. I helped a business move office locations. The business had a Win 2003 server that is the company web server and Exchange 2003 server. The network structure was a DSL internet connection, a Linux (generic) firewall, the 2003 server and a few client PCs on the network. In brief the move required a provider change so now the company is using a cable provider for phone and INET. When we finally got online we had some problems connecting. Not knowing the Linu...

ADO Find and Bookmark, inconsistent results any suggestions?
Hi All, i'm bit frustrated as all my users are reporting a weird behaviour from one of our access database. It is an ADP application on SQL Express 2005 as backend using Access 2003. No problem of this sort has been reported whatsoever, and no change have been done to either the dbase structure or the vba code since the problem came out. to be very concise, when a form open it will load -using the bookmark method- the first record available. this is the code: Dim rs As New ADODB.Recordset Set rs = Me.Recordset.Clone rs.MoveFirst rs.Find "[IdItemOrdered] = " &...

User Not Getting DL Messages
Hello, A User that belongs to a few DLs, is not getting messages sent to those groups. What gives then if the person is indeed part of them? Thanks in Advance, Angel On Mon, 3 Oct 2005 05:59:04 -0700, "Angel" <Angel@discussions.microsoft.com> wrote: >Hello, > >A User that belongs to a few DLs, is not getting messages sent to those >groups. > >What gives then if the person is indeed part of them? > >Thanks in Advance, >Angel Check message tracking. If it shows delivery, then look at the client side and see if there are rules, etc that may be...

SLL OWA on front-end server SP1
I'm setting up a new front-end OWA server at my organization. I installed an SSL certificate and enabled forms-based authentication, and I also set IIS to redirect to /exchange so users don't have to type that into the URL. Now, when I go to https://server I get to the proper forms-based authentication login page. However, when I go to http://server I get the other pop-up style username and password box, and when I type in my credentials, I'm successfully authenticated. I thought when you enable forms-based authentication it disables logging in on http... On my other OWA ...