$networks = Import-Clixml "Path/to/networks.xml"
$scan = netsh wlan show networks
foreach($network in $networks) {
foreach ($ssid in $scan) {
if (echo $ssid | Select-String $network.ssid -Quiet) {
netsh wlan connect $network.ssid
netsh interface ipv4 set address "number" source=static $network.ip $network.netmask $network.gateway
break
}
}
}