Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Obtaining a Live Communications Server User Instance ID

Office 2003
Microsoft Office Live Communications Server 2005 with SP1

Obtaining a Live Communications Server User Instance ID

The following code sample demonstrates how to obtain a Live Communication Server user's instance ID based on a supplied URI for the user.

To execute this code successfully, you must be a member of the Live Communications Server Domain User Admin group.

Public Function ObtainLCUserInstanceID(URI)

	' Connect to the WMI server.
	Set wmiServer = CreateObject("WbemScripting.SWbemLocator").ConnectServer()

	'Do error checking here.

	Query = "SELECT InstanceID FROM MSFT_SIPESUserSetting where PrimaryURI = '" & URI & "'"
	Set LCUserEnum = wmiServer.ExecQuery(Query)

	'Do error checking here.

	WScript.Echo "The following Live Communications User Instance IDs matched the supplied URI:"

	For each LCUser in LCUserEnum			

		WScript.Echo LCUser.InstanceID

	ObtainLCUserInstanceID = true

End Function
  What did you think of this topic?
  © 2008 Microsoft Corporation. All rights reserved.


Community Additions

© 2015 Microsoft