Solved

Post data to a form via Proxy

Posted on 2014-02-24
2
314 Views
Last Modified: 2014-02-26
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
0
Comment
Question by:tonelm54
2 Comments
 
LVL 39

Accepted Solution

by:
footech earned 500 total points
ID: 39883272
Are you running PS 3.0 or greater?  That cmdlet was introduced in PS 3.0.
0
 

Author Comment

by:tonelm54
ID: 39888183
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
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question