function set-ip-static ([string]$ip, [string]$strMask, [string]$gateway, [string]$dns1, [string]$dns2, [string]$networkInterface) {
netsh interface ipv4 set address name=$networkInterface static $ip $strMask $gateway 1
netsh interface ipv4 delete dnsservers name=$networkInterface all validate=no
netsh interface ipv4 set dns name=$networkInterface static addr=$dns1 validate=no
netsh interface ipv4 add dnsservers name=$networkInterface addr=$dns2 index=2 validate=no
}
function set-ip-whatever {
$ip = "192.168.201.25"
$strMask = "255.255.255.0"
$gateway = "192.168.201.254"
$dns1 = "8.8.8.8"
$dns2 = "8.8.4.4"
$networkInterface = "Wi-Fi 2"
set-ip-static $ip $strMask $gateway $dns1 $dns2 $networkInterface
}