Previous Next

Thread: In JScript, objEventLogInputFormat.resolveSIDs = true; does not work

Last post 08-07-2008 6:00 AM by cvengelen. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 08-07-2008, 4:34 AM

    • cvengelen
    • Not Ranked
    • Joined on 01-17-2007, 5:16 PM
    • Odijk, Nederland
    • Posts 3
    • cvengelen

    In JScript, objEventLogInputFormat.resolveSIDs = true; does not work

    I'm using JScript to execute a query on Security event logs, and use the following lines to resolve the SID's (taken from the Log Parser Help file):

    //Create EventLog input format
    var objEventLogInputFormat = new ActiveXObject( "MSUtil.LogQuery.EventLogInputFormat" );
    // Resolve SIDs
    objEventLogInputFormat.resolveSIDs = true;

    However, this does not work, since the SID in my output is not resolved. I use the followinq query:

    SELECT RecordNumber, SourceName, TimeGenerated, SID, ComputerName, EXTRACT_TOKEN(Strings, 13, '|') as SourceNetworkAddress, Message  FROM R:\temp\LogQueryWorkDir\Security.2008-07-02-16-50-42.evt WHERE eventID = 528  ORDER BY RecordNumber, TimeGenerated

    And the output , which I generate with the toNativeString method, still shows the SID unresolved I removed everything after the SID for safety):

    7, Security, 2008-07-02 10:16:22, S-1-5-21-2046926873-3586635073-1646930892-2756, ......

    Also, a WHERE clause on the SID only works with the numerical SID.

    So it seems that setting the property resolveSIDs  to true does not work. Setting it to "ON" is not allowed by JScript. Has this problem already been solved in any way, or is there a workaround ?

    Chris van Engelen,
    vtsPN
    Nederland
  • 08-07-2008, 6:00 AM In reply to

    • cvengelen
    • Not Ranked
    • Joined on 01-17-2007, 5:16 PM
    • Odijk, Nederland
    • Posts 3
    • cvengelen

    Re: In JScript, objEventLogInputFormat.resolveSIDs = true; does not work

    Disregard this posting: the problem was caused by executing the JScript from a computer on a completely different domain as the domain the event files were generated on (the event files were from a test domain). Then, obviously, SID resolution does not work, and the output just gives the SID. When executing the JScript on my test domain, where the event files were generated, SID resolution works just fine, of course.

    Sorry for any inconvenience.

    Chris van Engelen,
    vtsPN
    Nederland
Page 1 of 1 (2 items)
Page view counter