Skip to content

Instantly share code, notes, and snippets.

@megamorf
Created September 21, 2016 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save megamorf/2aea021fe7d093f0a070533489d607aa to your computer and use it in GitHub Desktop.
Save megamorf/2aea021fe7d093f0a070533489d607aa to your computer and use it in GitHub Desktop.
Query Telekom Mobile Data Status
Function Get-TelekomDataStatus
{
$IsConnected = Get-NetAdapter -Physical | where{$_.status -eq 'up' -and $_.MediaType -eq 'Wireless WAN'}
if($IsConnected)
{
Invoke-RestMethod -Uri 'http://pass.telekom.de/api/service/generic/v1/status'
}
else
{
Write-Warning "Nicht mit WWAN verbunden - Abfrage nicht möglich"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment