Add a Contact

Add a Contact

  • Comments 1
  • Likes

For more information on using this script, see the article Adminstratively Managing User Contact Lists by Nick Smith.

 

#Contributed by Nick Smith, Microsoft

#Supported Versions: Office Communications Server 2007 R2

#Get User Information

$User = Get-WmiObject -Query "Select * from MSFT_SIPESUserSetting where PrimaryURI = 'sip:user@domain.com'"

$UserInstanceID = $User.InstanceID 

 

#Create Contact instance

$Contact = (New-Object System.Management.ManagementClass("MSFT_SIPESUserContactData")).CreateInstance()

$Contact.UserInstanceID = $User.InstanceID

$Contact.SIPURI = "sip:userToBeAdded@domain.com"

$Contact.Subscribed = $True

 

#These next steps are optional unless you want to assign a contact to a contact group

$ContactGroup = (Get-WmiObject -Query "Select * from MSFT_SIPESUserContactGroupData where UserInstanceID = '$UserInstanceID'" | Where {$_.Name -like "NAME OF GROUP HERE"})

$Contact.GroupID = $ContactGroup.GroupID

 

#Create and commit contact

$Contact.Put()

Comments
  • Hello,

    I just found a new bug with the MS Communicator version 2007 R2. When i add a contact to my list then that alert/message is not displaying in other end if the OS version differs each other. And alert will be displayed immediately after next time login.

    It has really disappointed me :(   - to some extent

    One thought: I feel live object remains the same regardless of the OS version. I hope inter OS will not be a issue if you are raising the alert through Events and Delegate mechanism so i think there might be some issue before raising the event in this case.

    This fix will really help many users since by that time only they can come to know whether recipient accepted or rejected the request.

    Thanks Shradha, for making MS to know their issue without your knowledge. (if it is not a open issue).

    Regards

    Dayananda Swamy V.T

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment