text
stringlengths
0
4.23k
Sets the maximum size of the log in bytes. The minimum log size is 1048576 bytes (1024KB) and log files are always multiples of 64KB, so the value you enter will be rounded off accordingly.
/l:<Level>
Defines the level filter of the log. <Level> can be any valid level value. This option is only applicable to logs with a dedicated session. You can remove a level filter by setting <Level> to 0.
/k:<Keywords>
Specifies the keywords filter of the log. <Keywords> can be any valid 64-bit keyword mask. This option is only applicable to logs with a dedicated session.
/ca:<Channel>
Sets the access permission for an event log. <Channel> is a security descriptor that uses the Security Descriptor Definition Language (SDDL). For more information about SDDL format, see the Microsoft Developers Network (MSDN) Web site (https://msdn.microsoft.com).
/c:<Config>
Specifies the path to a configuration file. This option will cause log properties to be read from the configuration file defined in <Config>. If you use this option, you must not specify a <Logname> parameter. The log name will be read from the configuration file.
/ge:<Metadata>
Gets metadata information for events that can be raised by this publisher. <Metadata> can be true or false.
/gm:<Message>
Displays the actual message instead of the numeric message ID. <Message> can be true or false.
/lf:<Logfile>
Specifies that the events should be read from a log or from a log file. <Logfile> can be true or false. If true, the parameter to the command is the path to a log file.
/sq:<Structquery>
Specifies that events should be obtained with a structured query. <Structquery> can be true or false. If true, <Path> is the path to a file that contains a structured query.
/q:<Query>
Defines the XPath query to filter the events that are read or exported. If this option is not specified, all events will be returned or exported. This option is not available when /sq is true.
/bm:<Bookmark>
Specifies the path to a file that contains a bookmark from a previous query.
/sbm:<Savebm>
Specifies the path to a file that is used to save a bookmark of this query. The file name extension should be .xml.
/rd:<Direction>
Specifies the direction in which events are read. <Direction> can be true or false. If true, the most recent events are returned first.
/l:<Locale>
Defines a locale string that is used to print event text in a specific locale. Only available when printing events in text format using the /f option.
/c:<Count>
Sets the maximum number of events to read.
/e:<Element>
Includes a root element when displaying events in XML. <Element> is the string that you want within the root element. For example, /e:root would result in XML that contains the root element pair <root>.
/ow:<Overwrite>
Specifies that the export file should be overwritten. <Overwrite> can be true or false. If true, and the export file specified in <Exportfile> already exists, it will be overwritten without confirmation.
/bu:<Backup>
Specifies the path to a file where the cleared events will be stored. Include the .evtx extension in the name of the backup file.
/r:<Remote>
Runs the command on a remote computer. <Remote> is the name of the remote computer. The im and um parameters do not support remote operation.
/u:<Username>
Specifies a different user to log on to a remote computer. <Username> is a user name in the form domain\user or user. This option is only applicable when the /r option is specified.
/p:<Password>
Specifies the password for the user. If the /u option is used and this option is not specified or <Password> is *, the user will be prompted to enter a password. This option is only applicable when the /u option is specified.
/a:<Auth>
Defines the authentication type for connecting to a remote computer. <Auth> can be Default, Negotiate, Kerberos or NTLM. The default is Negotiate.
/uni:<Unicode>
Displays the output in Unicode. <Unicode> can be true or false. If <Unicode> is true then the output is in Unicode.
Remarks
Using a configuration file with the sl parameter
The configuration file is an XML file with the same format as the output of wevtutil gl <Logname> /f:xml. To shows the format of a configuration file that enables retention, enables autobackup, and sets the maximum log size on the Application log:
<?xml version=1.0 encoding=UTF-8?>
<channel name=Application isolation=Application
xmlns=https://schemas.microsoft.com/win/2004/08/events>
<logging>
<retention>true</retention>
<autoBackup>true</autoBackup>