Here's something I was looking for today on Google and couldn't find - how to get the website status code using PowerShell. Had to re-hash some C# code I found, and here it is:

try {
    $SiteURL = "http://www.webtechy.co.uk/"
    [System.Net.HttpWebRequest] $WebRequest = [System.Net.HttpWebRequest] [System.Net.WebRequest]::Create($SiteURL)
    [System.Net.HttpWebResponse] $WebResponse = [System.Net.HttpWebResponse] $WebRequest.GetResponse()
    $ResponseCode = $WebResponse.StatusCode
    Write-Host "Response code for $SiteURL is $ResponseCode" -Foregoundcolor Green
} catch [Net.WebException] {
    $ErrorMessage = $_.Exception.Message
    Write-Host "The following error occurred: $ErrorMessage" -ForegroundColor Red
}