If I run the following:
$nzpost = invoke-webrequest -uri https://nzpost.co.nz/tools/address-p...inder/address/[somenumber]/1 long street highbury palmerston north rd1
($nzpost.inputfields.value -split '\n')[1]
... i get the resolved address including the postcode (assuming a valid address).
If i had a csv file like the following:
address1, address2, city, rural
1 long street, highbury, palmerston north, rd1
1 short road, awapuni, palmerston north, rd1
(eg, $csvfile = import-csv -path 'c:\addresses.csv'
How would i do a scrape for-each of the csv file lines?
[somenumber] seems to be a static random that's re-usable.