wevtutil exe что это
WEVTUTIL – управление событиями в Windows.
Формат командной строки:
wevtutil КОМАНДА [АРГУМЕНТ [АРГУМЕНТ]. ] [/ПАРАМЕТР:ЗНАЧЕНИЕ [/ПАРАМЕТР:ЗНАЧЕНИЕ]. ]
Вы можете указывать имена команд и параметров как в краткой (например, «ep /uni»), так и в полной (например, «enum-publishers /unicode») форме. Команды, параметры и их значения вводятся без учета регистра. Для обозначения переменных используются прописные буквы.
el | enum-logs gl | get-log sl | set-log ep | enum-publishers gp | get-publisher im | install-manifest um | uninstall-manifest qe | query-events gli | get-log-info epl | export-log al | archive-log cl | clear-log | Получение списка имен журналов. Получение сведений о конфигурации журнала. Изменение конфигурации журнала. Получение списка издателей событий. Получение сведений о конфигурации издателя. Установка издателей и журналов событий из манифеста. Удаление издателей и журналов событий из манифеста. Запрос событий из журнала или файла журнала. Получение сведений о состоянии журнала. Экспорт журнала. Архивирование экспортированного журнала. Очистка журнала. |
Для получения дополнительных сведений о конкретной команде введите следующий текст:
Примеры использования WENTUTIL.
wevtutil el /r:192.168.1.3 /u:user1 /p:paswd1
Пример отображаемой информации:
creationTime: 2017-02-10T07:22:58.552Z
lastAccessTime: 2017-02-10T07:22:58.552Z
lastWriteTime: 2017-03-07T08:39:30.870Z
fileSize: 1118208
attributes: 2080
numberOfLogRecords: 1569
oldestRecordNumber: 1
name: System
enabled: true
type: Admin
owningPublisher:
isolation: System
channelAccess:O:BAG:SYD:(A;;0xf0007;;;SY)(A;;0x7;;;BA)(A;;0x3;;;BO)(A;;0x5;;;SO)(A;;0x1;;;IU)(A;;0x3;;;SU)(A;;0x1;;;S-1-5-3)(A;;0x2;;;S-1-5-33)(A;;0x1;;;S-1-5-32-573)
logging: logFileName: %SystemRoot%\System32\Winevt\Logs\System.evtx
retention: false
autoBackup: false
maxSize: 20971520
publishing:
fileMax: 1
Выводятся сведения о конфигурации журнала событий, включая его состояние (включен или выключен), текущий максимальный размер и путь к файлу, где хранится журнал.
name: System
guid: 00000000-0000-0000-0000-000000000000
helpLink:
message:
channels:
channel:
name: System
id: 8
flags: 1
message:
levels:
opcodes:
tasks:
task:
name: Устройства
value: 1
eventGUID: 00000000-0000-0000-0000-000000000000
message: 1
task:
name: Диск
value: 2
eventGUID: 00000000-0000-0000-0000-000000000000
message: 2
task:
name: Принтеры
Очистка журналов событий Windows с помощью PowerShell и wevtutil
Очистка журналов событий с помощью PowerShell
В том случае, если у вас установлен PowerShell 3 (по умолчанию уже установлен в Windows 8 / Windows Server 2012 и выше), для получения списка журналов и их очистки можно воспользоваться командлетами Get-EventLog и Clear-EventLog.
Запустите консоль PowerShell с правами администратора и с помощью следующей команды выведите список всех имеющихся в системе классических журналов событий с их максимальными размерами и количеством событий в них.
Для удаления всех событий из конкретного журнала событий (например, журнала System), воспользуйтесь командой:
Clear-EventLog –LogName System
В результате, все события из этого журнала будут удалены, а в журнале события останется только одно событие EventId 104 с текстом «The System log file was cleared».
Для очистки всех журналов событий нужно бы перенаправить имена журналов в конвейер, однако, к сожалению это запрещено. Поэтому нам придется воспользоваться циклом ForEach:
Таким образом, будут очищены все классические журналы EventLogs.
Очистка журналов с помощью консольной утилиты WevtUtil.exe
Для работы с событиями в Windows уже довольно давно имеется в наличии мощная утилита командой строки WevtUtil.exe. Ее синтаксис немного сложноват на первый взгляд. Вот, к примеру, что возвращает help утилиты:
Чтобы вывести список зарегистрированных в системе журналов событий, выполните команду:
WevtUtil enum-logs
или более короткий вариант:
На экране отобразится довольно внушительный список имеющихся журналов.
Можно получить более подробную информацию по конкретному журналу:
Очистка событий в конкретном журнале выполняется так:
Перед очисткой можно создать резервную копию событий в журнале, сохранив их в файл:
WevtUtil cl Setup /bu:SetupLog_Bak.evtx
Чтобы очистить сразу все журналы, можно воспользоваться командлетом Powershell Get—WinEvent для получения всех объектов журналов и Wevtutil.exe для их очистки:
Wevtutil el | ForEach
Примечание. В нашем примере не удалось очистить 3 журнала из-за ошибки доступа. Стоит попробовать очистить содержимое этих журналов из консоли Event Viewer.
Очистка журналов может быть выполнена и из классической командной строки:
wevtutil
Enables you to retrieve information about event logs and publishers. You can also use this command to install and uninstall event manifests, to run queries, and to export, archive, and clear logs.
Syntax
Parameters
Parameter | Description |
---|---|
Displays the names of all logs. | |
| Displays configuration information for the specified log, which includes whether the log is enabled or not, the current maximum size limit of the log, and the path to the file where the log is stored. |
| Modifies the configuration of the specified log. |
Displays the event publishers on the local computer. | |
[/ge: ] [/gm: ] [/f: ]] | Displays the configuration information for the specified event publisher. |
Installs event publishers and logs from a manifest. For more information about event manifests and using this parameter, see the Windows Event Log SDK at the Microsoft Developers Network (MSDN) Web site (https://msdn.microsoft.com). | |
Uninstalls all publishers and logs from a manifest. For more information about event manifests and using this parameter, see the Windows Event Log SDK at the Microsoft Developers Network (MSDN) Web site (https://msdn.microsoft.com). | |
[/lf: ] [/sq: ] [/q: ] [/bm: ] [/sbm: ] [/rd: ] [/f: ] [/l: ] [/c: ] [/e: ] | Reads events from an event log, from a log file, or using a structured query. By default, you provide a log name for . However, if you use the /lf option, then must be a path to a log file. If you use the /sq parameter, must be a path to a file that contains a structured query. |
| Displays status information about an event log or log file. If the /lf option is used, is a path to a log file. You can run wevtutil el to obtain a list of log names. |
[/lf: ] [/sq: ] [/q: ] [/ow: ] | Exports events from an event log, from a log file, or using a structured query to the specified file. By default, you provide a log name for . However, if you use the /lf option, then must be a path to a log file. If you use the /sq option, must be a path to a file that contains a structured query. is a path to the file where the exported events will be stored. |
| Archives the specified log file in a self-contained format. A subdirectory with the name of the locale is created and all locale-specific information is saved in that subdirectory. After the directory and log file are created by running wevtutil al, events in the file can be read whether the publisher is installed or not. |
| Clears events from the specified event log. The /bu option can be used to back up the cleared events. |
Options
is *, the user will be prompted to enter a password. This option is only applicable when the /u option is specified.
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 /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:
Examples
List the names of all logs:
Display configuration information about the System log on the local computer in XML format:
Use a configuration file to set event log attributes (see Remarks for an example of a configuration file):
Display information about the Microsoft-Windows-Eventlog event publisher, including metadata about the events that the publisher can raise:
Install publishers and logs from the myManifest.xml manifest file:
Uninstall publishers and logs from the myManifest.xml manifest file:
Display the three most recent events from the Application log in textual format:
Display the status of the Application log:
Export events from System log to C:\backup\system0506.evtx:
Clear all of the events from the Application log after saving them to C:\admin\backups\a10306.evtx:
Скачать Wevtutil.exe и исправить ошибки EXE
Последнее обновление: 07/03/2021 [Среднее время чтения статьи: 4,7 мин.]
Файлы Eventing Command Line Utility, такие как wevtutil.exe, используют расширение EXE. Файл считается файлом Win32 EXE (Библиотека динамической компоновки) и впервые был создан компанией Microsoft для пакета ПО Microsoft® Windows® Operating System.
Файл wevtutil.exe изначально был выпущен с Windows Vista 11/08/2006 для ОС Windows Vista. Датой самого последнего выпуска файла для Windows 10 является 07/29/2015 [версия 10.0.15063.0 (WinBuild.160101.0800)]. Файл wevtutil.exe включен в пакет ПО в Windows 10, Windows 8.1 и Windows 8.
В этой статье обсуждаются подробные сведения о файлах, порядок устранения неполадок с файлом EXE при проблемах с wevtutil.exe, а также полный набор бесплатных загрузок для каждой версии файла, которая была зарегистрирована нашей командой.
Рекомендуемая загрузка: исправить ошибки реестра в WinThruster, связанные с wevtutil.exe и (или) Windows.
Совместимость с Windows 10, 8, 7, Vista, XP и 2000
Средняя оценка пользователей