返回列表 发帖

[求助]:XP下如何查询几天前的网络连接会话?

脚本
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_LogonSession")
For Each objItem in colItems
    Wscript.Echo "Authentication Package: " & objItem.AuthenticationPackage
    Wscript.Echo "Logon ID: " & objItem.LogonId
    Wscript.Echo "Logon Type: " & objItem.LogonType
    Wscript.Echo "Start Time: " & objItem.StartTime
    Wscript.Echo
Next

TOP

[求助]:XP下如何查询几天前的网络连接会话?

只支持Windows Server 2003
和Windows XP
class Win32_LogonSession : Win32_Session
{
  string AuthenticationPackage;
  string Caption;
  string Description;
  datetime InstallDate;
  string LogonId;
  uint32 LogonType;
  string Name;
  datetime StartTime;
  string Status;
};
这里class没有method

TOP

返回列表 回复 发帖