Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Hey, Scripting Guy! How can I Migrate a VBScript to Windows PowerShell that parses a log file for errors?

  (image)   Q: Hey Scripting Guy! I need to migrate a VBScript to Windows PowerShell 2.0 that I use to parse a log file for errors that occur during a specific operation. I am only interested in the errors, not the success statements. Because this log has a tendency to grow rather large, I would like to write the failure ...