EventLogSession.ExportLog EventLogSession.ExportLog EventLogSession.ExportLog Method

Definition

Exports events into an external log file. The events are stored without the event messages.

Overloads

ExportLog(String, PathType, String, String) ExportLog(String, PathType, String, String) ExportLog(String, PathType, String, String)

Exports events into an external log file. The events are stored without the event messages.

ExportLog(String, PathType, String, String, Boolean) ExportLog(String, PathType, String, String, Boolean) ExportLog(String, PathType, String, String, Boolean)

Exports events into an external log file. A flag can be set to indicate that the method will continue exporting events even if the specified query fails for some logs. The events are stored without the event messages.

ExportLog(String, PathType, String, String) ExportLog(String, PathType, String, String) ExportLog(String, PathType, String, String)

Exports events into an external log file. The events are stored without the event messages.

public:
 void ExportLog(System::String ^ path, System::Diagnostics::Eventing::Reader::PathType pathType, System::String ^ query, System::String ^ targetFilePath);
public void ExportLog (string path, System.Diagnostics.Eventing.Reader.PathType pathType, string query, string targetFilePath);
member this.ExportLog : string * System.Diagnostics.Eventing.Reader.PathType * string * string -> unit

Parameters

path
String String String

The name of the event log to export events from, or the path to the event log file to export events from.

pathType
PathType PathType PathType

Specifies whether the string used in the path parameter specifies the name of an event log, or the path to an event log file.

query
String String String

The query used to select the events to export. Only the events returned from the query will be exported.

targetFilePath
String String String

The path to the log file (ends in .evtx) in which the exported events will be stored after this method is executed.

See also

ExportLog(String, PathType, String, String, Boolean) ExportLog(String, PathType, String, String, Boolean) ExportLog(String, PathType, String, String, Boolean)

Exports events into an external log file. A flag can be set to indicate that the method will continue exporting events even if the specified query fails for some logs. The events are stored without the event messages.

public:
 void ExportLog(System::String ^ path, System::Diagnostics::Eventing::Reader::PathType pathType, System::String ^ query, System::String ^ targetFilePath, bool tolerateQueryErrors);
public void ExportLog (string path, System.Diagnostics.Eventing.Reader.PathType pathType, string query, string targetFilePath, bool tolerateQueryErrors);
member this.ExportLog : string * System.Diagnostics.Eventing.Reader.PathType * string * string * bool -> unit

Parameters

path
String String String

The name of the event log to export events from, or the path to the event log file to export events from.

pathType
PathType PathType PathType

Specifies whether the string used in the path parameter specifies the name of an event log, or the path to an event log file.

query
String String String

The query used to select the events to export. Only the events returned from the query will be exported.

targetFilePath
String String String

The path to the log file (ends in .evtx) in which the exported events will be stored after this method is executed.

tolerateQueryErrors
Boolean Boolean Boolean

true indicates that the method will continue exporting events even if the specified query fails for some logs, and false indicates that this method will not continue to export events when the specified query fails.

See also

Applies to