Action |
Logs an event in the Windows NT event log.
Syntax |
LOGEVENT (type, ID, message, target,
source)
Parameter |
Type
Number representing the type of the event. Possible values :
0 |
SUCCESS |
1 |
ERROR |
2 |
WARNING |
4 |
INFORMATION |
8 |
AUDIT_SUCCESS |
16 |
AUDIT_FAILURE |
ID
Number representing the event that occurred.
Message
Message text of the event. Note that the length of the message is limited to 32000 characters.
Target
Optional parameter representing the UNC name of the system where the event should be logged. By default, all events are logged on the local system.
Source
Optional parameter representing the source of the event. If this parameter is not specified, Kixtart will assume the KIX32.EXE as the source of the event.
Returns |
0 |
Event logged |
Error code |
Function failed |
Remarks |
This function is only available on clients running Windows NT or higher.
Example |
$RC = LogEvent( 0 , 1 , "Logon script completed successfully" , "", "MyEvent" )
$RC = LogEvent( 0 , 1 , "Logon script completed successfully")
$RC = LogEvent( 1 , 1 , "Logon script failed!"
, @LSERVER )