Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: write to eventlog?

HTVi
TV Discussion Newsgroups

write to eventlog?
Dabbler 5/18/2007 3:51:00 AM
does anyone have an example of how to write to an eventlog in PowerShell? I
need to record success or failure of a script to Application log.

Thanks much.
Re: write to eventlog?
Trevor Sullivan <pcgeek86[ at ]geemale.com> 5/18/2007 12:24:29 PM
Dabbler wrote:
[Quoted Text]
> does anyone have an example of how to write to an eventlog in PowerShell? I
> need to record success or failure of a script to Application log.
>
> Thanks much.

If you're using Powershell, you can use either the WshShell COM object,
or the EventLog class in the .NET System.Diagnostics namespace.

Hope this helps.

Trevor Sullivan
MCP
http://develnet.blogspot.com

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen