($_.Split(":")) won't work for me because it will split on the time (07:00:01) and some of the names also contain mulitple colons with a space between them.
So my text file is literally:
HostName: SHHKRSP1
TaskName: 1263
Next Run Time: 07:30:00, 10/19/2007
Status:
Last Run Time: 07:30:00, 10/15/2007
Last Result: 0
Creator: kronosSQLagent
Schedule: At 7:30 AM every Mon, Fri of every 2 weeks, starting 10/3/2005
Task To Run: D:\Kronos\wfc\bin\TaskRunner.exe -e 1263
Start In: D:/Kronos/wfc\data
Comment: Event - Event Name: Time Detail - Pham
Time Detail
Scheduled Task State: Enabled
Scheduled Type: Weekly
Start Time: 07:30:00
Start Date: 10/3/2005
End Date: N/A
Days: MONDAY,FRIDAY
Months: N/A
Run As User: tmc\kronossqlagent
Delete Task If Not Rescheduled: Disabled
Stop Task If Runs X Hours and X Mins: 72:0
Repeat: Every: Disabled
Repeat: Until: Time: Disabled
Repeat: Until: Duration: Disabled
Repeat: Stop If Still Running: Disabled
Idle Time: Disabled
Power Management: No Start On Batteries, Stop On Battery Mode
The code I wrote above seems to solve my problem. I had to break it down. Now I have to work on getting this to a CSV file.