[xml]$Weather = Get-Content "C:\Users\Morten\Downloads\GetMeasuredWeatherData.xml"
#$Weather.d2LogicalModel.payloadPublication.siteMeasurements.Item(207).measuredvalue.measuredvalue.basicdata
$Lygna = $Weather.d2LogicalModel.payloadPublication.siteMeasurements
| Where-Object { $_.measurementsitereference.id
-eq '206' }
$LygnaAirTemp = $lygna.measuredValue[3].innertext
$LygnaRoadTemp = $lygna.measuredValue[2].innertext
$LygnaPrecipitation = $lygna.measuredValue[1].innertext
Write-Host -BackgroundColor White -ForegroundColor Red "Status RV4 Lygnasæter"
Write-Host -ForegroundColor Yellow "###################################"
Write-Host -ForegroundColor Green "Nåværende lufttemperatur på Lygna er $lygnaairtemp °C"
Write-Host -ForegroundColor Green "Nåværende veibanetemperatur på Lygna er $lygnaroadtemp °C"
Write-Host -ForegroundColor Green "Nåværende nedbørintensitet på Lygna er $lygnaPrecipitation mm/t"