Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Script backup log windows server 2003

Reply
Thread Tools Display Modes

Script backup log windows server 2003

 
 
carlo76
Guest
Posts: n/a

 
      10-05-2009

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.



 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a

 
      10-05-2009

"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.


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
backup server for Windows 2003 SBS w/ Exchange 2003 dschmoldt Windows Small Business Server 10 10-28-2006 09:00 PM
Script for print server migration on windows server 2000 or 2003 Vijay Gavali Scripting 0 09-07-2006 06:48 AM
WMI Script to apply to Windows Server 2003 only Warren Scripting 1 02-12-2006 08:51 PM
ASR backup set created By windows 2003 server native backup Jason Blake Windows Server 0 06-07-2005 09:51 AM
Re: Can Windows 2000 Server be used as a Backup Domain Controller for Windows 2003 Server? Laura E. Hunter \(MVP\) Active Directory 1 10-06-2004 08:27 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59