Hello,

Can anyone share a code snippet with me for writing to the Application
event log of a remote server?? (Windows 2000/2003).

Thanks,
Troy

Re: Write to a remote event log by Michael

Michael
Sat Jun 10 00:29:31 CDT 2006

brudertl wrote:
> Hello,
>
> Can anyone share a code snippet with me for writing to the Application
> event log of a remote server?? (Windows 2000/2003).
>

Download details: Windows Script 5.6 Documentation
<http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en>

Then look up the LogEvent method...

Adds an event entry to a log file.

object.LogEvent(intType, strMessage [,strTarget])

Arguments
object WshShell object.

intType Integer value representing the event type.

strMessage String value containing the log entry text.

strTarget Optional. String value indicating the name of the computer system
where the event log is stored (the default is the local computer system).
Applies to Windows NT/2000 [MH: or later] only.


--
Michael Harris
Microsoft MVP Scripting



Re: Write to a remote event log by brudertl

brudertl
Mon Jun 12 11:39:05 CDT 2006


Michael Harris (MVP) wrote:
> brudertl wrote:
> > Hello,
> >
> > Can anyone share a code snippet with me for writing to the Application
> > event log of a remote server?? (Windows 2000/2003).
> >
>
> Download details: Windows Script 5.6 Documentation
> <http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en>
>
> Then look up the LogEvent method...
>
> Adds an event entry to a log file.
>
> object.LogEvent(intType, strMessage [,strTarget])
>
> Arguments
> object WshShell object.
>
> intType Integer value representing the event type.
>
> strMessage String value containing the log entry text.
>
> strTarget Optional. String value indicating the name of the computer system
> where the event log is stored (the default is the local computer system).
> Applies to Windows NT/2000 [MH: or later] only.
>
>
> --
> Michael Harris
> Microsoft MVP Scripting