Microsoft Operations Manager |
The GetSessionIDFromWinStationmethod gets the unique identifier (ID) of a session from a given WinStationname.
[VBScript]
TermServer.GetSessionIDFromWinStation(WinStation Variant, sessionID
Variant, [ComputerName Variant])
Boolean
The following example shows how to get the session ID for a given session name.
[VBScript]
Function GetSessionID(strWinStationName)
Dim objTermServer, lngSessionID, blnOK
Set objTermServer = CreateObject("OpScrUtil.TermServer")
blnOK =
objTermServer.GetSessionIDFromWinStation(strWinStationName,
lngSessionID)
If Not(blnOK) Then
lngSessionID = -1
End If
Set objTermServer = Nothing
GetSessionID = lngSessionID
End Function
Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1
Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.