erobby
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:
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
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, User2.
copies the information to a comma separated text file3.
queries lenovo website to get the warranty expiration dateI'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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks I just need to tweak it now for my script.