We have recently rolled out live comms version 2005 and would like to make a
few comments that may save you a lot of time and effort that i have gone
through.
We have the requirement to automatically populate contacts for all users,
based upon ou membership and also for this to be updated on a regular basis.
To this end i have put together a few batch scripts that furfill this.
The utilise the various scripts available in lcs res kit.
Step 1 - extract user information from active directory
dsquery * "OU=test,OU=test2,DC=ms,DC=tst,DC=int" -attr
msRTCSIP-PrimaryUserAddress -scope onelevel -limit 10000 > contacts.txt
This will extract all sip addresses from user objects contained within the
ou and place them into the file contacts.txt. If you have sub ou's under this
one remove '-scope onelevel' from the commandline, as it will extract the
subtree.
Step 2 - Import contacts into users contacts list
lcsaddcontacts.wsf /usersfile:contacts.txt /contactsfile:contacts.txt
/contactsgroup:Test
This will import all the contacts extracted from the dsquery command into
the same list of users for all the same contacts. For example if contacts.txt
contains
sip:j...@test.ocm
sip:jo...@test.com
joe and joe2 will both see each other as contacts, as the format of the file
is compatible with the lcsaddcontacts script. The user is displayed by their
default ad user details.
Step 3 - Automatically authorise users to allow everyone to be able to
subscribe to them or see their status
lcsaddaces.wsf /usersfile:contacts.txt /acesfile:acesfile.txt
Acesfile.txt contains the following :
all allow allow
General
I have taken this to the next level as we have various business unitswhich
we pre-populate various groups and no business units sees all the groups
(besides i.t)
Hope this helps a few guys
Thanx for adding this (it's really difficult following the scripts) but I'd
like to ask some silly questions if I may.
Step 1 should be run at the LCS server?
What about Steps 2 & 3? Adding contacts will have to be done a user level
yes? How did you accomplish this? Did you run the scripts via a login script?
Thanx for any advice.
Not a problem, it took me a few days to get this all working and if i can
save someone else the hassle i might as well post :)
>
> Step 1 should be run at the LCS server?
>
> What about Steps 2 & 3?
All are to be run at the server mate, as they require some of the wmi
extensions that only exist on the same machine with lcs installed on,
although ive heard if you have the admin tools installed for lcs you can also
run them from that machine but i havent tried.
> yes? How did you accomplish this? Did you run the scripts via a login script?
As you may notice the second bunch of scripts require two files for input,
the first is a list users, and the second is the actual contacts. What
happens is that users in the second file(contacts parameter) are added to the
list of users contacts in the first file.
For example the following command
lcsaddcontacts.wsf /usersfile:users.txt /contactsfile:contacts.txt
/contactsgroup:Test
users.txt
contacts.txt
bart.s...@blah.com
homer....@blah.com
What will now happen is that user joe.bloggs will have bart.simpson and
homer.simpson added to their group called test.
It took me a while to get my head around the way it works, but it is pretty
good, much better than using login scripts and running it every login. As you
can automate the whole process to run outside peak hours.
Any more questions give me a shout
"Ray Breen" <RayB...@discussions.microsoft.com> a écrit dans le message de
news:E7F03ADD-942C-4E3C...@microsoft.com...
> Not a problem, glad its working for you
Can you paste the contents of your file.
msRTCSIP-PrimaryUserAddress
sip:Fchev...@nordiqlab1.net
sip:gfan...@nordiqlab1.net
"Ray Breen" <RayB...@discussions.microsoft.com> a écrit dans le message de
news:E6BB1163-AE0E-4ADF...@microsoft.com...
that looks fine,can you tell me the syntax of the commandline that you use
to run the import on
Here's my query
dsquery * "OU=TGI,OU=ANJ,OU=Domain Users,DC=Nordiqlab1,DC=net" -attr
msRTCSIP-PrimaryUserAddress -scope onelevel -limit 10000 > c:\contacts.txt
"Ray Breen" <RayB...@discussions.microsoft.com> a écrit dans le message de
news:BFC3510E-6A6D-4CBB...@microsoft.com...
lcsaddcontacts.wsf /usersfile:contacts.txt /contactsfile:contacts.txt
/contactsgroup:Test
"Ray Breen" <RayB...@discussions.microsoft.com> a écrit dans le message de
news:CF27AF8F-5BDE-438C...@microsoft.com...
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
@------------------------------------------------------------
@ Text file with Users: contacts.txt
@ Text file with Contacts: contacts.txt
@ Contact Group for Contacts: Test
@------------------------------------------------------------
@------------------------------------------------------------
@ Adding contacts...
@ PrimaryURI: sip:Fchev...@nordiqlab1.net
@ InstanceID: {3D2724E1-9D48-BB45-AA56-ADE0DCF39942}
@ ContactGroupID: 1
@------------------------------------------------------------
[+] Put successful for contact: (sip:Fchev...@nordiqlab1.net)
[+] Put successful for contact: (sip:gfan...@nordiqlab1.net)
[+] Put successful for contact: (sip:jde...@nordiqlab1.net)
[+] Put successful for contact: (sip:Mase...@nordiqlab1.net)
[+] Put successful for contact: (sip:mlabr...@nordiqlab1.net)
[+] Put successful for contact: (sip:sboi...@nordiqlab1.net)
[+] Put successful for contact: (sip:tes...@nordiqlab1.net)
[+] Put successful for contact: (sip:tqu...@nordiqlab1.net)
@------------------------------------------------------------
@ Adding contacts...
@ PrimaryURI: sip:gfan...@nordiqlab1.net
@ InstanceID: {BE29FD7B-44A3-2148-85B4-3D437942FF66}
@ ContactGroupID: 1
@------------------------------------------------------------
[+] Put successful for contact: (sip:Fchev...@nordiqlab1.net)
[+] Put successful for contact: (sip:gfan...@nordiqlab1.net)
[+] Put successful for contact: (sip:jde...@nordiqlab1.net)
[+] Put successful for contact: (sip:Mase...@nordiqlab1.net)
[+] Put successful for contact: (sip:mlabr...@nordiqlab1.net)
[+] Put successful for contact: (sip:sboi...@nordiqlab1.net)
[+] Put successful for contact: (sip:tes...@nordiqlab1.net)
[+] Put successful for contact: (sip:tqu...@nordiqlab1.net)
"Ray Breen" <RayB...@discussions.microsoft.com> a écrit dans le message de
news:DA5879D3-929F-40C1...@microsoft.com...
"Ray Breen" <RayB...@discussions.microsoft.com> a écrit dans le message de
news:5482A456-9E96-41C3...@microsoft.com...
"Ray Breen" <RayB...@discussions.microsoft.com> a écrit dans le message de
news:1A7E6368-7841-41BD...@microsoft.com...
Did you figure out how to add the same contact to multiple contact groups?
LCSADDCONTACTS.WSF always removes existing contacts from existing groups.
Thanks!
Benjamin
Still cannot thank you enough for simplifying this process for all but I've
got 2 more questions:
If I add a new user then I obviously need to run this again. By running it
again (extracting all users, adding them to the same group, auto
authorisation, etc) does this not replicate users or groups at all? I don't
want to creat multiple groups or users within LCS?
Ray, you also mention a script you run every day. Can you share this with us
as well as some of us would find this useful to have as well (i.e. me). How
are you running it?
Thanx again.
I am testing this in a lab, and used this syntax (exactly)
dsquery * "OU=users,DC=hcctest,DC=local" -attr
msRTCSIP-PrimaryUserAddress -scope onelevel -limit 10000 >contacts3.txt
any help would be greatly appreciated. I already got the LCSaddcontacts
to work, but it is a little confusing. After reading this thread, I
finally added all of the users to both the usersfile and the
contactsfile and it worked. But I want to be able to automate bringing
new AD users into this file somehow. If I get the dsquery thing to
work, I would have to get it to update both the users AND contacts
files??
Thanks in advance
-J
-J
dsquery * "DC=**,DC=**,DC=com" -attr msRTCSIP-PrimaryUserAddress -limit
10000 -q -filter (msRTCSIP-UserEnabled=TRUE) > contacts.txt
The filter helps. A LOT.
Scott wrote:
> [B]This was a great post. One question I have, hoping you may be able
> to answer
> is that when I use dsquery without -scope onelevel, the text file
> that I get
> has a lot of spaces and skipped lines. In the format requirements of
> the txt
> file it says that each line needs to have a SIP entry. When I run the
> import
> script on my text file with spaces the script pauses and needs user
> input
> claiming invalid data. Any ideas why my file would have so many
> spaces or how
> to avoid the import script from stopping on errors.
> Thanks,
> Scott
> [B]
--
Alan.W
------------------------------------------------------------------------
http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message1953698.html