Put your parameters in a hash table and pass them like this:
$postParams = @{username="me";moredata="qwerty"}
Invoke-WebRequest -Uri http://example.com/foobar -Method POST -Body $postParams
More Related Contents:
- Powershell script to delete 15 days old .txt files [duplicate]
- How to run an EXE file in PowerShell with parameters with spaces and quotes
- Use PowerShell to run virus scan on multiple servers
- Unable to access UNC Paths in Powershell remote session
- Fastest Way to get a uniquely index item from the property of an array
- PowerShell IE9 ComObject has all null properties after navigating to webpage
- PowerShell script runs when pasted into the PowerShell window, but not when run from shortcut
- PowerShell’s Invoke-RestMethod equivalent of curl -u (Basic Authentication)
- Remove files and foldes on Azure before a new deploy from VSTS
- PowerShell: Unable to find type when using PS 5 classes
- Pass object[] into a function in PowerShell
- Specifying *.xls filter in Get-ChildItem also returns *.xlsx results
- Inserting a date into SQL
- Prompt for user input in PowerShell
- Powershell output column width
- Run a [Code] or PowerShell script in Inno Setup compiler
- Can the following Nested foreach loop be simplified in PowerShell?
- Add Write-Progress to Get-Job/Wait-Job
- Powershell with exchange– How do I append all verbose output to a file
- How to handle command-line arguments in PowerShell
- How do I get the body of a web request that returned 400 Bad Request from Invoke-RestMethod
- How to send email with PowerShell
- How to split string by string in Powershell
- Powershell: Colon in commandlet parameters
- Passing PowerShell variables into a script block
- Why is $false -eq “” true?
- powershell function switch param with string array
- Boolean literals in PowerShell
- Difference between PowerShell Console and PowerShell ISE
- Unix newlines to Windows newlines (on Windows)