I have created a map in the dude where we monitor the network devices from the ISP by ping.
Now i want to add the provider name to the shapes, we have 2 providers and i can read the providername with powershell:
Code: Select all
$IPAdres = 'xxx.xxx.xxx.xxx'
$DNS = [System.Net.Dns]::GetHostByAddress("$IPAdres").HostName
If($DNS -match "ziggo")
{
'Ziggo'
}
ElseIf ($DNS -match "kpn")
{
'KPN'
}
Else
{
Write-Host 'provider unknown'
}