Question

right now I am working on script which replaces the eventlogger. Basicially I use terms like :

get-eventlog -logname System -EntryType Error -newest 4 | out-file C:\Projects\test.txt

to get all error logs in a text file. In my txt file the I will find this :

  5751 Sep 25 11:42  Error       Microsoft-Windows...         1054 The processing of Group Policy failed. Windows ...

What I need is the full message, but I wasn't able to find the command to display full messages without these ... I know it is possible, but I can't find the solution anymore.

Was it helpful?

Solution

How about this?

get-eventlog -logname System -EntryType Error -newest 4 | fl * | out-file C:\logs.txt

OTHER TIPS

Give this a try:

get-eventlog -logname System -EntryType Error -newest 4 |  
ft -AutoSize -Wrap | 
out-string -width 4096 | # or an [INT] big enough...
out-file .\test.tx
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top