Monday, July 16, 2012

PowerShell sending requests

From time to time, I have to generate a request to some web service for each element from a database. From a db I tend to generate a PowerShell commands to send a request:
$page = (New-Object System.Net.WebClient).DownloadString("http://localhost/")
And if one needs to know what was returned
Write-Host "$page"

No comments: