Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Submit the form and get warranty details using Invoke-WebRequest

$
0
0

Hi Tomasz,

Welcome to the PowerShell.org forums. For your next post please explain what is not working and what kind of help you're looking for.

Please check if below code works for you:

Param
(
    [String]$SerialNumber = 'HU265BM18V',
    [String]$ProductNumber = 'H1P31AA'
)
 
$fields = @(
    'tmp_weCountry=us',
    "tmp_weSerial=$SerialNumber",
    "tmp_weProduct=$ProductNumber",
    "product=",
    "lc=en",
    "dlc=en"
    "cc=us"
)
 
$result=Invoke-WebRequest -Uri 'http://h10025.www1.hp.com/ewfrf/wc/weResults' -Method POST -Body ($fields -join '&')
$result.RawContent | Out-File -FilePath C:\Temp\hp.html | & 'C:\Program Files\Internet Explorer\iexplore.exe' C:\Temp\hp.html

Best,
Daniel


Viewing all articles
Browse latest Browse all 13067

Trending Articles