I have a question regarding Powershell 1.0

  RedWolf 10:05 21 Mar 2011

I have recently started teaching myself scripting in Powershell 1.0. I have previously written a number of batch files in DOS and want to use something more powerful, yet familiar.
One of my first tasks I've set myself is to write a script to output to csv file any error messages that appear in system log.
I've written the following:
get-eventlog system | where-Object {$_.entryType -match 'Error'} | Out-file SysLog.csv

which does work, however, the error description itself gets truncated. By amending the width of the screen buffer size of the Powershell window, I have managed to extend what is captured but as I want to be able to send this script to users to run (PowerShell 1.0 is incorporated into the build), I do not want to have to talk them through making the aforementioned amendment. Can someone can point me in the right direction as to how to get all the error description displayed please? I've had a look around online and not found anything.

Thanks in advance,

  RedWolf 11:15 21 Mar 2011

Thanks for that, ideally it needs to be a single line.
Regarding using ft-wrap, where should I use that in the command please?



  RedWolf 15:18 21 Mar 2011

Thanks for your help. I think |ft -wrap | is going to be the more useful one.
I guess the next step is to play around with the data manipulation commands now :D

Thanks again,


This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Dell XPS 13 9370 (2018) review

No need to scan sketches into your computer with Moleskine's new smart pen

HomePod review

Streaming : Netflix ou Amazon Prime Video ?