locked
lcsaddcontacts.wsf RRS feed

  • Question

  • Technet,

    So, I've got my installation done and configured for the 07 beta.  My users can im and do voice.  HOWEVER, I cannot get the lcsaddcontacts script to work correctly on the backend server.  This is a pain to my test users who don't enjoy having to add people manually as once you get over 20 folks it gets ridiculous.  So, I tried using the script.  It runs and finishes with no errors just as it had for 05 when I was testing it.  But, when you go to the client and sign off, sign back on, the contact list goes from (whatever it had) to empty.  I figured this was an issue with group policy of some sort and attempted to run the other script lcsaddaces.wsf but it fails when I attempt to run it.  I've set it up as the whitepapers and other newsgroups have suggested.  Does anyone else no of a fix/work around?

     

    Dan

    Thursday, April 19, 2007 9:05 PM

Answers

  • Here are some general guidelines as mentioned in the readme for the script. Once the script has been run, you can use Wbemtest to see if the contacts were populated correctly.

    Q: How do I confirm whether the contacts have been added?

    A: Run Wbemtest.exe. Connect to root\CIMv2, and then click Query. Run the following query: SELECT * FROM MSFT_SIPESUserContactData WHERE UserInstanceID = {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.

    Also, always run script with the a group specified. i.e.

    cscript LCSAddContacts.wsf /usersFile:value /contactsFile:value /contactsGroup:value

    If a group is not specified the contacts will not show up in Communicator.

     

    Please let me know if there are still any unresolved issues around this?

    Wednesday, June 27, 2007 11:17 PM

All replies

  • Do you get any errors/events on the servers or client computers?
    Thursday, April 26, 2007 11:30 PM
  • After running the lcsaddcontacts.wsf?

     

    None, it actually looked perfect.  It looked exactly the same as 2005 when it worked.

    Friday, April 27, 2007 9:58 PM
  • Here are a few suggestions to get started:

    1. Run the lcsaddcontacts,wsf file from the OCS 2007 FE server itself. All the *.wsf file requires is the insallation of OCS Administration tools. This will add the necesarry objects to the local WMI along with the needed fuctionality to move the information to the SQL BE database.

    2. When you run the lcsaddcontacts.wsf file to add contactsjust use the script in a single instance from a command prompt. Do not include it in a batch file that will run the same process with the /delete switch.
    Wednesday, May 9, 2007 7:49 PM
  • Thom,

     

    I also tried to use the lcsaddcontacts.wsf to import contacts with no success. I did exactly as you said, testing against my own account. The script runs fine from the command prompt and indicates " [+]   Put successful for contact:  (sip:xyz@contoso.com)" so there is no idication that anything went wrong. I am wondering about the fuctionality needed to move the information to the SQL BE database that you mention. Is there anyway to figure out if that is the piece that is failing?

    Thursday, May 10, 2007 4:43 PM
  • You can try to synchronise the client address book manually from the client by deleting the address book file and sign in again, or on the server with the command "abserver –syncnow"

    Regards

     

    Sylvain

    Tuesday, May 15, 2007 4:06 PM
  • thanks as I thought I was the only one with this issue for quite a while.  Still isn't working btw.
    Monday, May 21, 2007 8:15 PM
  • Krups, thanks for the suggestion. In our scenario we need to be able to use the import command. We are upgrading from LCS 2003. What I have found so far is that peoples contacts are being automatically discovered and then they are being prompted to add them as contacts. However in a lot of cases not all of their contacts are being retained. I will give your suggestion a try, but It sure would be convenient if the lcsaddcontacts.wsf worked as it should.
    Wednesday, May 23, 2007 3:02 PM
  • Could you post the result of the lcsaddcontacts.wsf command?

    I use it on my testing platform without problem.

     

    Sylvain

    Tuesday, May 29, 2007 1:21 PM
  • Joec

     

    You need to run and configure the LCSAddACEs.wsf to suppress prompting for adding users in MOC 2007 when users log in.

     

    regards

     

    Adrian

     

     

    Wednesday, May 30, 2007 1:59 AM
  • Krups, here is the the command I ran and the results:

     

    C:\Contacts>cscript lcsaddcontacts.wsf /usersfile:UsersFile.txt /ContactsFile:ContactsFile.txt
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    @------------------------------------------------------------
    @ Text file with Users:       usersfile.txt
    @ Text file with Contacts:    contactsfile.txt
    @ Contact Group for Contacts:
    @------------------------------------------------------------


    @------------------------------------------------------------
    @ Adding contacts...
    @  PrimaryURI:     sip:zzxwhi@contoso.com
    @  InstanceID:     {A103F1E9-E176-F04A-81C7-E8148DCA80D2}
    @  ContactGroupID:
    @------------------------------------------------------------
    [+]   Put successful for contact:  (sip:jcalvi@contoso.com)
    [+]   Put successful for contact:  (sipTongue Tiedczesak@contoso.com)
    [+]   Put successful for contact:  (sipBig Smilevelasquez@contoso.com)
    [+]   Put successful for contact:  (sip:nmignott@contoso.com)
    [+]   Put successful for contact:  (sip:bbrown@contoso.com)
    [+]   Put successful for contact:  (sip:jcouncil@contoso.com)
    [+]   Put successful for contact:  (sip:aevangelista@contoso.com)
    [+]   Put successful for contact:  (sip:jpanycia@contoso.com)
    [+]   Put successful for contact:  (sip:mereynolds@contoso.com)

    Wednesday, May 30, 2007 12:47 PM
  • Quite strange...

    Maybe you can try to specify a group in the command line in order to let the previous list the users have.

    Thursday, May 31, 2007 9:29 AM
  • Hi Dan,

    Can you let us know the status of your issue? If you have been able to find a resolution, can you share it with the forums? If not, please let us know asap.

    Thanks. 

    Friday, June 22, 2007 3:47 PM
  • Hi Dan and Krups,

    Can you let us know the status of your issues?

    Wednesday, June 27, 2007 6:25 PM
  • Here are some general guidelines as mentioned in the readme for the script. Once the script has been run, you can use Wbemtest to see if the contacts were populated correctly.

    Q: How do I confirm whether the contacts have been added?

    A: Run Wbemtest.exe. Connect to root\CIMv2, and then click Query. Run the following query: SELECT * FROM MSFT_SIPESUserContactData WHERE UserInstanceID = {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.

    Also, always run script with the a group specified. i.e.

    cscript LCSAddContacts.wsf /usersFile:value /contactsFile:value /contactsGroup:value

    If a group is not specified the contacts will not show up in Communicator.

     

    Please let me know if there are still any unresolved issues around this?

    Wednesday, June 27, 2007 11:17 PM
  • Salman, thanks for the suggestion. Interesting, when I run the lcsaddcontacts.wsf with the /contactsGroup switch I get the following error output:

     

    C:\Contacts>cscript LCSAddContacts.wsf /usersFile:UsersFile.txt /contactsFile:ContactsFile.txt /contactsGroup:Team
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    @------------------------------------------------------------
    @ Text file with Users:       usersfile.txt
    @ Text file with Contacts:    contactsfile.txt
    @ Contact Group for Contacts: Team
    @------------------------------------------------------------


    @------------------------------------------------------------
    @ Adding contacts...
    @  PrimaryURI:     sip:zzxwhi@malcolmpirnie.com
    @  InstanceID:     {A103F1E9-E176-F04A-81C7-E8148DCA80D2}
    @  ContactGroupID: 6
    @------------------------------------------------------------
    C:\Contacts\LCSAddContacts.wsf(253, 7) Microsoft VBScript runtime error: Type mismatch: 'UBound'

     

    I have tried to specify pre-existing groups as well as new (i.e. Personal, Company; Friends, Test) but I get the error each time. However, If I eliminate the  /contactsGroup switch, it runs successfully everytime (as shown in my earlier post). Strange thing is the groups are created. However the contacts never get populated under them.

     

     

     

    Tuesday, July 10, 2007 7:57 PM
  • The error you have is due to a bug in the script. You have certainly tried to first add users without the group in parameter. After this it's not possible anymore to add a user in a group.

    We have corrected the script to manage this problem, it's not so difficult.

     

    Sylvain

    Wednesday, July 11, 2007 12:02 PM
  • Thanks for clearing that up Krups. Is the new script available for download yet?
    Wednesday, July 11, 2007 1:50 PM
  • No it's not available as it's an internal modification we have done.

    In fact the users have been created in an empty group. To solve the problem you can go to SQL Server in order to delete the users view entries in the tables. I think that you have to check 2 or 3 tables.

    When the clean is done you can launch the script again with a correct group in parameter.

    I don't remember the name of the tables but you can add comment in the script to know exactly what you have to check.

     

    Sylvain

    Thursday, July 12, 2007 9:08 AM
  • Sylvain: Are you able to tell us which line(s) you changed in the script to get it to work for you?

    Or what we can do to resolve this problem?

     

    We are running the Release Candidate version and the script still does not work for adding users (it works for creating groups and deleting users however)

     

    When you say "You have certainly tried to first add users without the group in parameter. After this it's not possible anymore to add a user in a group." Do you mean after you have atttempted to add users without the scripts group parameter, you won't be able to add them even with it? But if you always remember to use the group parameter it will always work??

     

    We really need this to work as our user id's are impossible for other users to remember off the top of their heads, and we've been unable to get our reverse proxy working for external client address books (friendly names).

     

     

    Wednesday, July 18, 2007 12:42 AM
  • I mean that if you have attempted to add user without group you won't be able to add user in a group anymore.

    The problem is that "oInstance.GroupId" is null line 253 and they don't manage this case. So the Ubound function crash.

    The best way I think is not to correct the script but to clean the following tables in SQL Server in order to start from scratch :

    - Contact

    - ContactGroup

    - ContactGroupAssoc

     

    After this you can try the script again. Don't forget to put the group ;-)

     

    Sylvain

    Wednesday, July 18, 2007 1:49 PM
  • Ok thanks for the tip..

     

    Taking a look into them all I can see are premary keys / numbers and <binary data>

    How do we find the 'dirty records' or do we have to delete all the records in them?

     

    This would clear everybody's existing contact lists right Sad

    Thursday, July 19, 2007 4:17 AM
  • Yes you're right it will clear everybody...but with the script you can add them again.

    Just backup the tables if you want to be sure...

    Thursday, July 19, 2007 6:58 AM
  • Krups, is there a way to export contacts for all the OCS 2007 clients from the server? There doesnt seem to be a way to do it from either the client or the server. I plan on clearing out the sql tables but wont proceed until I have an export of everyones current contact list. Backing up the sql tables is not an option for me.

     

    Nevermind, I was able to get a complete dump using the DBImpExp.exe utility. It can be found here: C:\Program Files\Office Communications Server 2007\Server\Support

    Tuesday, July 24, 2007 3:48 PM
  • Hi everyone,

    I've got here something, and i can't figure it out yet. LCSAddContacts does not delete contacts of removed users. Any suggestions anyone?

    Any help would be appreciated.

    Best wishes,
    Nikolai
    Friday, March 6, 2009 3:30 PM
  • By removed users i mean: The user removed from the group. So if the user is removed from the group contact shoud also be removed from comunicator. But this didn't happen. :(
    Tuesday, March 17, 2009 11:00 AM
  • You may use   (OCSCM) Microsoft Office Communications Server Contact Manager.It's an administration mmc tool that will integrate with Microsoft Office Communication Server 2007 and Active Directory to provide an easy way to provision OCS users’ contacts list.   OCSCM is designed to show you how to manage the contacts and groups for individual ocs users by interacting with the Active Directory Domain Services and Microsoft Office Communication Server 2007/R2 and lcs 2005.

    download from http://www.ocscm.com

    Sunday, December 20, 2009 8:51 PM