MMC - Event Viewer - Command Line - Cannot access security event logs

Discussion in 'Windows Small Business Server' started by Alan, Apr 20, 2006.

  1. Alan

    Alan Guest

    Hi All,

    We are using the CLI for the Event Viewer to periodically create logs
    of the events on machines in our domain.

    However, we cannot get the security logs to work.

    A sample of the command line we are using is as follows:

    cscript eventquery.vbs /s MachineName /fo csv /v /l security

    This is then piped into a CSV file for later analysis as required.

    However, tt gives the following error:
    "The process cannot access the file because it is being used by
    another process."


    If we run this one (for the application log) it works fine:

    cscript eventquery.vbs /s MachineName /fo csv /v /l application


    If I use the MMC - Event Viewer I can access both the application and
    security logs fine, and can export (save as) to a file if I want.


    Does anyone know why this should be, and how we can overcome it?

    Thanks,

    Alan.
    --

    The views expressed are my own, and not those of my employer or anyone
    else associated with me.

    My current valid email address is:



    This is valid as is. It is not munged, or altered at all.

    It will be valid for AT LEAST one month from the date of this post.

    If you are trying to contact me after that time,
    it MAY still be valid, but may also have been
    deactivated due to spam. If so, and you want
    to contact me by email, try searching for a
    more recent post by me to find my current
    email address.

    The following is a (probably!) totally unique
    and meaningless string of characters that you
    can use to find posts by me in a search engine:

    ewygchvboocno43vb674b6nq46tvb
     
    Alan, Apr 20, 2006
    #1
    1. Advertisements

  2. Alan

    Alan Guest

    {Bump}
     
    Alan, Apr 21, 2006
    #2
    1. Advertisements

  3. Hi Alan,

    Thanks for posting here.

    From your post, my understanding on the issue is: you cannot access
    security log via command line. (cscript eventquery.vbs /s MachineName /fo
    csv /v /l security), but he can access security log in Event Viewer and he
    can export security log fine. if I am off base, please feel free to let me
    know.

    Based on my knowledge, in this case, please post you questions in the
    Developer newsgroups since this newsgroup is primarily for break-fix
    situations. The issues include custom coding/programming, scripting,
    design/implementation type of issues would best be addressed in the
    Developer newsgroups. I have provided the link below to access Developer
    newsgroups. By posting here, you may get some pointers from others who may
    have had similar experience that they can share with you.

    http://msdn.microsoft.com/newsgroups/default.asp

    Thank you for your patience and understanding.

    Have a nice day.

    Best Regards,

    Steven Zhu
    MCSE
    Microsoft Online Partner Support
    Get Secure! - www.microsoft.com/security
    ======================================================
    PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were
    updated on February 14, 2006.? Please complete a re-registration process
    by entering the secure code mmpng06 when prompted. Once you have
    entered the secure code mmpng06, you will be able to update your profile
    and access the partner newsgroups.
    ======================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from this issue.
    ======================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.
    ======================================================
     
    Steven Zhu [MSFT], Apr 21, 2006
    #3
  4. {trip}
     
    SuperGumby [SBS MVP], Apr 21, 2006
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.