$urlHost = 'http://sysops-prod.east-west.dk'
$urlPath = '/nagios/cgi-bin/status.cgi?host=Equipment'

$uri = $urlHost + $urlPath

$request = [System.Net.HttpWebRequest]::Create($uri)

try { 
    [System.Net.HttpWebResponse]$request.GetResponse() 
}
catch {

    $ex = $_.Exception.InnerException

    if($ex.Response -eq $null -or ([System.Net.HttpWebResponse]$ex.Response).StatusCode -ne [System.Net.HttpStatusCode]::Unauthorized) { throw $_ }


    #$header = $_.Response.Headers['WWW-Authenticate']



}