exchangefreaks.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VB Script to add Exchange Contacts to an AD Group

 
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange 2000 Active Directory Integration
Author Message
Russ Ferrill



Joined: 06 Aug 2007
Posts: 2

PostPosted: Sat Feb 28, 2004 3:59 am    Post subject: VB Script to add Exchange Contacts to an AD Group Reply with quote

I have a script that creates Exchange contacts in AD. I need to add them to
groups as well. Can someone please tell me how to do this? I can add users
to groups with no problem, but I haven't found a way to reference a contact
that lets me add it to a group. Thanks.

Archived from group: microsoft>public>exchange2000>active>directory>integration
Back to top
View user's profile Send private message
Piotr Trochimiuk



Joined: 05 Aug 2007
Posts: 1

PostPosted: Mon Mar 01, 2004 5:50 pm    Post subject: Re: VB Script to add Exchange Contacts to an AD Group Reply with quote

Look for solution here:
http://www.microsoft.com/technet/community/scriptcenter/user/default.mspx

I saw there examples of creating contacts and adding users to groups. Maybe
some mix of two examples will give what you want.
--
Piotr Trochimiuk
MCSE, MCSA:Messaging



> I have a script that creates Exchange contacts in AD. I need to add them
to
> groups as well. Can someone please tell me how to do this? I can add users
> to groups with no problem, but I haven't found a way to reference a
contact
> that lets me add it to a group. Thanks.
>
>
Back to top
View user's profile Send private message
Glen Scales [MVP]



Joined: 05 Aug 2007
Posts: 92

PostPosted: Mon Mar 01, 2004 7:56 pm    Post subject: Re: VB Script to add Exchange Contacts to an AD Group Reply with quote

If your talking about a mail enabled AD contact then you can do it the same
way as you add a user to a group as long as you know the DN of the group and
contact. eg

Set oGroup = GetObject(LDAP://CN=testgroup,CN=Users,DC=youdomain,DC=com)
Set oContact =
GetObject(LDAP://CN=testcontact,CN=Users,DC=yourdomain,DC=com)
oGroup.Add(oContact.AdsPath)
oGroup.SetInfo
Set oContact = Nothing
Set oGroup = Nothing

Cheers
Glen

"Russ Ferrill" wrote in message%b.6455$et6.4541@newssvr23.news.prodigy.com...
> I have a script that creates Exchange contacts in AD. I need to add them
to
> groups as well. Can someone please tell me how to do this? I can add users
> to groups with no problem, but I haven't found a way to reference a
contact
> that lets me add it to a group. Thanks.
>
>
Back to top
View user's profile Send private message
Russ Ferrill



Joined: 06 Aug 2007
Posts: 2

PostPosted: Mon Mar 01, 2004 8:47 pm    Post subject: Re: VB Script to add Exchange Contacts to an AD Group Reply with quote

Thanks, that did the trick!

"Glen Scales [MVP]" wrote in message$DHA.688@tk2msftngp13.phx.gbl...
> If your talking about a mail enabled AD contact then you can do it the
same
> way as you add a user to a group as long as you know the DN of the group
and
> contact. eg
>
> Set oGroup = GetObject(LDAP://CN=testgroup,CN=Users,DC=youdomain,DC=com)
> Set oContact =
> GetObject(LDAP://CN=testcontact,CN=Users,DC=yourdomain,DC=com)
> oGroup.Add(oContact.AdsPath)
> oGroup.SetInfo
> Set oContact = Nothing
> Set oGroup = Nothing
>
> Cheers
> Glen
>
> "Russ Ferrill" wrote in message
> %b.6455$et6.4541@newssvr23.news.prodigy.com...
> > I have a script that creates Exchange contacts in AD. I need to add them
> to
> > groups as well. Can someone please tell me how to do this? I can add
users
> > to groups with no problem, but I haven't found a way to reference a
> contact
> > that lets me add it to a group. Thanks.
> >
> >
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
X.400 and Exchange 2000 Dear experts, I continue to have a problem in a Mixed mode Exch 5.5 and Exch 2000 sending a message to a user with no SMTP address, just X.400. The message is rejected. Here is the Scenario: W2K Forest with 3 domains. All domains are conected with the R

AD Exchange 2000 System drive space issue Hi all, thanks for the info.. We have an Exchange 2k sp3, Win2k sp4, AD server. After installing SP4 on it I had a lot of problems, 2000 pro clients couldn't log into the network, NtFrs event log errors etc. After a pulling out hairs, I figured out that

Distribution list - Universal group in AD Hello, Currently we have Windows 2003 SP1, Exchange 2003 SP2. Ditribution list is Global and Domain local group. We also have nested DL within the DL. We are having problem with users sending email to the DL that reciepients did not received the email.

Move mailbox from exchange 2000 to exchange 2003 across diff Hi All, We are trying to move mailbox from exchange 2000 to exchange 2003 across different groups and different domain. Our AD is win 2000 and most of the exchange servers are exchnage 2000 SP3 and above and one server is Windows 2003 SP2 &

Exchange 2003 and Exchange Resource Manager Something has broken the ability to allow Exchange Resource Manager (a third party tool from SimplerWeb that manages calanders for mailboxes) to manage a resource. All settings are as the ERM requires for the service account and logged on user - it uses
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange 2000 Active Directory Integration All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group