[PowerShell[ How do I log an event in a script?

Discussion in 'Scripting' started by David Moisan, May 2, 2006.

  1. David Moisan

    David Moisan Guest

    Hello,

    I'm looking for a way to log an entry into the Event Log similar to
    what's in WSH, to quote a line from one of my VB scripts:

    WshShell LogEvent constInformational, DisplayMsg

    I've been looking all over for an equivalent in PowerShell. Is there
    a COM or .NET object I could use?

    Take care,

    Dave
    David Moisan, N1KGH, SKYWARN
    Invisible Disability: http://www.davidmoisan.org/invisible_disability.html
    GE Superradio FAQ: http://www.davidmoisan.org/faqs/superradio/gesr_faq.html
    Sangean ATS-909 FAQ: http://www.davidmoisan.org/faqs/sangean/ats909faq.html
     
    David Moisan, May 2, 2006
    #1
    1. Advertisements

  2. Marcel Ortiz [MSFT], May 2, 2006
    #2
    1. Advertisements

  3. David Moisan

    David Moisan Guest

    Browsing through that now. It's a surprising omission to an otherwise
    excellent shell.
    David Moisan, N1KGH, SKYWARN
    Invisible Disability: http://www.davidmoisan.org/invisible_disability.html
    GE Superradio FAQ: http://www.davidmoisan.org/faqs/superradio/gesr_faq.html
    Sangean ATS-909 FAQ: http://www.davidmoisan.org/faqs/sangean/ats909faq.html
     
    David Moisan, May 2, 2006
    #3
  4. Browsing through that now. It's a surprising omission to an otherwise
    To ship is to choose.

    We'll get there.
     
    Jeffrey Snover [MSFT], May 2, 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.