"carlo76" <> wrote in message
news:...
> Buongiorno,
> in base alle ultime misure del garante in materia di protezione di dati
> personali (registrazione degli accessi per un congruo periodo non
> inferiore
> a 6 mesi), ho necessità di schedulare un backup del log eventi security di
> un server (controller di dominio) con windows server 2003 !.
> Come posso procedere o secondo Voi qual'è la strada giusta per questo tipo
> di operazione ?
> Grazie e saluti.
Here you go:
'---------------------------------
'Back up the Security event logger
'http://www.microsoft.com/technet/scriptcenter/guide/sas_log_hdyb.mspx?mfr=true
'17.9.2009 FNL
'---------------------------------
sLog = "c:\Security.evt"
Set oWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Backup, Security)}!" & _
"\\.\root\cimv2")
Set cLogFiles = oWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile where LogFileName='Security'")
Set oFSO = CreateObject("Scripting.FileSystemObject")
If oFSO.FileExists(sLog) then oFSO.DeleteFile(sLog)
For Each oLogfile In cLogFiles
If oLogfile.BackupEventLog(sLog) <> 0 _
Then MsgBox "Could not back up the " & sBranch & " Event Log."
Next
Note also that this is an English-speaking newsgroup. Since not many of the
potential respondents speak Italian, you might get more replies if you
posted in English or if you selected an Italian-speaking newsgroup for your
posts.
|