Skip to content

Instantly share code, notes, and snippets.

@alkalinecoffee
Last active September 30, 2016 15:50
Show Gist options
  • Save alkalinecoffee/9081031 to your computer and use it in GitHub Desktop.
Save alkalinecoffee/9081031 to your computer and use it in GitHub Desktop.
Simple Web Requests in PowerShell
# Ignore any SSL certificate errors
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
(New-Object System.Net.WebClient).DownloadFile("http://example.com/myfile.txt", "C:\myfile.txt")
# Ignore any SSL certificate errors
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
(New-Object System.Net.WebClient).DownloadString("http://example.com/get_test_response")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment