Files
tldr/pages.zh/windows/eventcreate.md
2022-10-04 23:06:23 +08:00

22 lines
767 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# eventcreate
> 在事件日志中创建自定义条目。
> 事件 ID 可以是 1 到 1000 之间的任意数值。
> 更多信息:<https://learn.microsoft.com/windows-server/administration/windows-commands/eventcreate>.
- 在日志中创建一个具有给定 id1-1000的新事件
`eventcreate /t {{success|error|warning|information}} /id {{id}} /d "{{消息}}"`
- 在特定事件日志中创建事件:
`eventcreate /l {{日志名}} /t {{类型}} /id {{id}} /d "{{消息}}"`
- 为新创建的事件指定来源:
`eventcreate /so {{来源名}} /t {{类型}} /id {{id}} /d "{{消息}}"`
- 在远程计算机的事件日志中创建事件:
`eventcreate /s {{主机名}} /u {{用户名}} /p {{密码}} /t {{类型}} /id {{id}} /d "{{消息}}"`