Microsoft Operations Manager

BackupEventLog Method

The BackupEventLogmethod saves the specified event log to a backup file. This does not clear the event log.

EventLog.BackupEventLog(EventLogName Variant, OutputFolderName
Variant, SavedFilePath Variant, [MachineName Variant])


Specifies the name of the log file to back up, such as Application or System.
Specifies the folder to which the output file should be saved. When backing up event logs from the local computer, this parameter can be a string containing system environment variables (such as %TEMP%). On remote computers where the system environment may vary, set this parameter to a specific folder name or to an empty string.
Set to the path name of the file to which the event log was saved. The file name is always generated automatically.
Specifies the target computer. This parameter is optional. If the target computer is not specified or the parameter is an empty string, the local computer is the target.

Return Value



The backup file name is automatically generated. The format of the file name is OMEventLog_(EventLogName)_(CurrentDate and Time).evt.

The EventLogobject should not be used when creating new scripts. It is included only to support existing scripts. For more information about equivalent APIs, see Using Operating System APIs in Scripts.


Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

EventLog Object

Did you find this information useful? Please send your suggestions and comments about the documentation to