I have a question regarding Powershell 1.0

  RedWolf 10:05 21 Mar 11
Locked

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

  RedWolf 11:15 21 Mar 11

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

Cheers,

RedWolf

  RedWolf 15:18 21 Mar 11

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,

RedWolf

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

Sniper Elite 4 review: Headshotting Nazis has never felt so good

1995-2015: How technology has changed the world in 20 years

Framestore’s haunting post-WWII title sequence for new BBC series SS-GB

New iOS 11 release date rumours UK | new features coming to Siri, FaceTime, Messages and Video