Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invoke-WebRequest equivalent in PowerShell v2

Tags:

Can some one help me with the powershell v2 version of the below cmdlet.

$body = 
"<wInput>
  <uInputValues>
   <uInputEntry value='$arg' key='stringArgument'/>
  </uInputValues>
  <eDateAndTime></eDateAndTime>
  <comments></comments> 
</wInput>"

$password = ConvertTo-SecureString $wpassword -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential ($wusername, $password)

$output = Invoke-WebRequest -Uri $URI1 -Credential $credential -Method Post -ContentType application/xml -Body $body