Windows 模拟生成日志 命令

转自http://technet.microsoft.com/en-us/library/bb490899.aspx,用来备份

 

例子:

eventcreate /t error /id 100 /l application /d "Create event in application log" 

eventcreate /t information /id 1000 /so winmgmt /d "Create event in WinMgmt source" 
eventcreate /t error /id 2001 /so winword /l application /d "new src Winword in application log" 
eventcreate /s server /t error /id 100 /l application /d "Remote machine without user credentials" 
eventcreate /s server /u user /p password /id 100 /t error /l application /d "Remote machine with user credentials" 
eventcreate /s server1 /s server2 /u user /p password /id 100 /t error /so winmgmt /d "Creating events on Multiple remote machines" 
eventcreate /s server /u user /id 100 /t warning /so winmgmt /d "Remote machine with partial user credentials"

 

语法:

Parameters

/s   Computer   Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.

/u   Domain \ User   Runs the command with the account permissions of the user specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command.

/p   Password   Specifies the password of the user account that is specified in the /u parameter.

/l { APPLICATION | SYSTEM Specifies the name of the event log where the event will be created. The valid log names are APPLICATION and SYSTEM.

/so   SrcName   Specifies the source to use for the event. A valid source can be any string and should represent the application or component that is generating the event.

/t { ERROR | WARNING | INFORMATION | SUCCESSAUDIT | FAILUREAUDIT Specifies the type of event to create. The valid types are ERROR, WARNING, INFORMATION, SUCCESSAUDIT, and FAILUREAUDIT.

/id   EventID   Specifies the event ID for the event. A valid ID is any number from 1 to 65535.

/d   Description   Specifies the description to use for the newly created event.

/? Displays help at the command prompt.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值