2017-06-29 3 views

Antwort

0

Meinst du Ereignisquelle? Powershell wäre New-EventLog Befehl hier

MSDM New-eventLog

Bearbeiten nach ausführlicher geliefert.

Grundprinzip von was Sie wollen, ist die Abfrage der Protokolldatei und schreiben Sie die gefundenen Zeilen in ein Ereignisprotokoll. Das ist wie das unten getan:

#Get the content of the error log, gets the top 10 lines ONLY!! 
$GetLog = Get-Content -Path D:\Errorlog.txt -totalcount 10 

#Now take the data found and write it to the event log under the source and log below 
Write-EventLog -LogName "Application" -Source "My Application" -Eventid 1001 
-EntryType Error -Message "$Getlog" -Category 1 
+0

ich brauche myapplication.log das Protokoll der Anwendung in Ereignisprotokoll-Fenster angezeigt werden ---> Anwendungsereignisprotokoll Fenster –

+0

Richtig, ich Sie jetzt zu bekommen. Ich denke, das ist möglich .... Bear with me –

+0

danke Richard, aber wie kann ich es in Echtzeit –

Verwandte Themen