Skip to content

Instantly share code, notes, and snippets.

@gpolitis
Created December 21, 2012 10:21
Show Gist options
  • Save gpolitis/4351971 to your computer and use it in GitHub Desktop.
Save gpolitis/4351971 to your computer and use it in GitHub Desktop.
URL testing recipe in PowerShell
$regex = 'some regex goes here'
sls .\*.* -patt $regex -All | % { $_.Matches } | ? { $_.Success } | % { $_.Groups[2].Value }
sls .\*.* -patt $regex -All | % { $_.Matches } | ? { $_.Success } | % { Invoke-WebRequest $_.Groups[2].Value } | % { $_.StatusCode }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment