Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Post data to a form via Proxy

Posted on 2014-02-24
2
Medium Priority
?
348 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 41

Accepted Solution

by:
footech earned 2000 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

Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

Question has a verified solution.

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

Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

705 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