新手,大虾们帮帮忙,关于导出系统日志
strBackupName = aaaaaaaaSet objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate,(Backup)}!\\" & _strComputer & "\root\cimv2")Set colLogFiles = objWMIService.ExecQuery("Select * from Win32_NTEventLogFile where LogFileName='System'")For Each objLogfile in colLogFiles Wscript.Echo "Time Written: " & objLogfile.TimeWritten objLogFile.BackupEventLog("c:\System-" & strBackupName & ".evt") objLogFile.ClearEventLog()Next
sClassName = "Win32_NTEventLogFile"For Each x In GetObject("Winmgmts:" & sClassName).Properties_ WScript.Echo x.NameNext