Link to home
Start Free TrialLog in
Avatar of tonelm54
tonelm54

asked on

Post data to a form via Proxy

I want to be able to submit a webform with some values, however my simple code just says:-
The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
 or if a path was included, verify that the path is correct and try again.


My code is quite simple, and dont see why it should not work:-
$postParams = @{username='me';moredata='qwerty'}
$test = Invoke-WebRequest -Uri "http://example.com/foobar" -Method POST -Body $postParams -Proxy '172.16.8.11:3128'

Open in new window


Any ideas?

Thank you
ASKER CERTIFIED SOLUTION
Avatar of footech
footech
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tonelm54
tonelm54

ASKER

You were right, I did upgrade to Powershell 3.0 but now I just get a different error message. Ive opened up a new question under Q_28374722 would you mind looking at it to see where Im going wrong now?

Thank you