Problems posting to http form

I have found a script online which allows me to post to a http page via powershell. The problem i have is that although it shows no errors and seems to get responses back ok, i never actually see any posted data. Anyone got any ideas?

Without knowing what the Web page is doing on the other end, it's impossible to say. It could be looking for a cookie you haven't passed, it might not be intended to return any data, it might be checking referrer strings, it could be a million things.

So, when you do a POST, the form fields go into the HTTP request, but they have to be formatted in a specific way. The server decodes that and, in the case of ASP, give you the Request object. My guess is that the information isn't going into the right format or spot, so the server doesn't "see" it. Manually constructing a set of POST headers is a little outside my expertise, though.

So, you're not technically "posting the following to the form." You're posting it to the server. The server doesn't "insert the values into the form fields;" your actual HTML form tags aren't being used by your PowerShell code.

This would be a lot easier with a GET. You just call your Web page with URL parameters: mywebpage.asp?nic=xxx&mac=abc123. Then you don't have to construct POST headers and whatnot. But it still doesn't "fill in the form fields;" it's just sending the values AS IF the form had been manually filled out.