I have to set 3 variables depending on the IP address.
I discovered that I can use switch with -regex, but I don't know how to check if address is between two addresses.
$ip = (get-WmiObject Win32_NetworkAdapterConfiguration|Where {$_.Ipaddress.length -gt 1}).ipaddress[0]
switch -regex ($ip)
{
"address 192.168.0.1-192.168.0.255" { $val = 3; }
"address 192.168.1.1-192.168.1.100" { $val = 1; }
"address 192.168.1.101-192.168.1.200" { $val = 4; }
"address 192.168.1.201-192.168.1.255" { $val = 5; }
default { exit }
}