イベントログ(アプリケーション)は下記サイトの通りにできました。
http://www.microsoft.com/japan/technet/scriptcenter/scripts/logs/eventlog/lgevvb01.mspx
特権の設定が必要なようなのですが、バックアップおよびクリアのWMIを教えてください。
セキュリティログへのアクセスには、ログへのアクセス権の設定が必要なようです。
一応下記のようにして、動作しました。
(権限をもったユーザで実行する必要があります。)
strComputer = "." Set objWMIService = GetObject("winmgmts:{(backup)}\\" & strComputer & "\root\cimv2") Set colLogFiles = objWMIService.ExecQuery _ ("Select * from Win32_NTEventLogFile where LogFileName='security'") For Each objLogfile in colLogFiles objLogFile.Security_.Privileges.AddAsString "SeSecurityPrivilege", True errBackupLog = objLogFile.BackupEventLog("C:\sec.evt") If errBackupLog <> 0 Then Wscript.Echo "The security event log could not be backed up." Else objLogFile.ClearEventLog() End If Next
http://www.microsoft.com/japan/msdn/columns/scripting/scripting0...
http://www.microsoft.com/japan/technet/scriptcenter/resources/qa...
ありがとうございました!