Skip to content

Instantly share code, notes, and snippets.

@fbouynot
Last active October 4, 2023 09:08
Show Gist options
  • Save fbouynot/375c6a6e135bb4de33a9f0dd6b0b9242 to your computer and use it in GitHub Desktop.
Save fbouynot/375c6a6e135bb4de33a9f0dd6b0b9242 to your computer and use it in GitHub Desktop.
curl-powershell.ps
try { Invoke-WebRequest -Uri https://198.51.100.1/ -Headers @{Host='www.example.com'} -Method HEAD -UseBasicParsing | Select-Object -ExpandProperty Headers } catch { $_.Exception.Response.StatusCode ; $_.Exception.Response.Headers.ToString() }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment