/build/static/layout/Breadcrumb_cap_w.png

Back up event log

 

 

set LogFileSet = GetObject("winmgmts:{impersonationLevel=impersonate,(Backup)}").ExecQuery("select * from Win32_NTEventLogFile where LogfileName='Application'")

 

For each Logfile in LogFileSet

                RetVal = LogFile.BackupEventlog("C:\New folder\BACKUP.LOG")

                if RetVal = 0 then WScript.Echo "Log Backed Up"

Next


Comments

This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ