PowerShell Commands
Invoke-WebRequest
GET Invoke-WebRequest
$varUrl = "https://postman-echo.com/get"
Invoke-WebRequest -Method Get -Uri $varUrl -TimeoutSec 7200 | Select-Object -Expand Content$varUrl = "https://postman-echo.com/get"
Try
{
$response = Invoke-WebRequest -Method Get -Uri $varUrl -TimeoutSec 7200
$response.StatusCode
$response.Content
}
Catch
{
$ErrorMessage = $_.Exception.Message
Write-Output($ErrorMessage)
$FailedItem = $_.Exception
Write-Output($FailedItem)
Break
}POST Invoke-WebRequest
Set Powershell to skip SSL certificate checks
Reference
Last updated