Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

get-eventlog Ausgabe in ein Logfile

$
0
0

Hallo, hier mal eine hoffentlicht leichte Frage.

ich möchte die letzten 10 Events abfragen und in eine Datei schreiben. Das funktioniert auch prima, nur gibt es eine kleine Einschränkung. Ich bekomme "Message" extreme gekürzt angezeigt. Wie erreiche ich es, dass der ganze Text der unter "Message" steht auch angezeigt wird bzw. ins Logfile geschrieben wird.

get-eventlog -computerName $computername -logname system -newest 10	 | out-file $ReportFile_sys 
get-eventlog -computerName $computername -logname application -newest 10 | out-file $ReportFile_app 

   Index Time          EntryType   Source                 InstanceID Message  
   ----- ----          ---------   ------                 ---------- -------  
   15513 Nov 29 11:00  Information MsiInstaller                 1042 Windows...
   15512 Nov 29 11:00  Information MsiInstaller                 1033 Das Pro...


IT Berater



Viewing all articles
Browse latest Browse all 2314


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>