Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Powershell - Parse Data Returned from Web Request

$
0
0

$result = Invoke-WebRequest http://partsurfer.hp.com/Search.aspx?SearchText=614988-B21

Now, I want to grab two lines in the output that looks like:

Product Number : 614988-B21
Description : HP SCO8E 6 GB SAS HOST BUS ADAPTER (HBA)

How can I grab the text that appears after "Description :" up to the end of line?

I've tried things like:

$result.allelements | where {$_.innertext -like "Description : "} | select innertext

But that doesn't give me the whole line. Just echoes "Description :"

Obviously, the exact part number and description will vary. This is just one example.


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>