Link to home
Start Free TrialLog in
Avatar of erobby
erobbyFlag for United States of America

asked on

Parsing a file for a date

A powershell Noob,

I'm trying to parse a webpage to pull the expiration date of the equipment.  

Process so far:

1.

Powershell Script goes out and Queries each machine on the network and gets the following: Serial Number, Model, User

2.

copies the information to a comma separated text file

3.

queries lenovo website to get the warranty expiration date
I'm trying to use the HTML temp file to parse the expiration date.  All I want is the expiration date from the file, but because the literal expression is "<td valign="top" width="120">2015-10-20</td><td valign="top" width="4">" with the expiration date being "2015-10-20" I'm unable to get that information.

I can't do a query for the exact match because as mentioned it's several machines.  Once I can complete the query I can output the data to a text file, I just can't figure out how to format the query.

The temp HTML file is attached.

Thanks in advance

Eric
WarrantyLookup.txt
ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of erobby

ASKER

Subsun,

Thanks I just need to tweak it now for my script.