草庐IT

InsertionString

全部标签

windows - 如何判断 Win32_NTLogEvent InsertionString 是否存在?

我创建了一个VBScript来显示我的系统日志内容。如果存在,我还想包括InsertionString。但是,我似乎无法确定是否存在InsertionString。这是我的脚本的开头:SetobjWMIService=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")Setrs=objWMIService.ExecQuery("Select*fromWin32_NTLogEventWhereLogfile='System'andSourceName='mysource'")ForEachobjEve