Obtaining a Live Communications Server User Instance ID
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.
[VBScript]
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
Next
ObtainLCUserInstanceID = true
End Function
What did you think of this topic? |
© 2008 Microsoft Corporation. All rights reserved. |