powershell - Add wlan profile with password in windows programmatically -
is possible programmatically add wifi profile windows operating system (minimum version windows 7)?
i tried netsh add profile , connect, doesn't work me. there powershell commands this?
i want set wifi password special ssid many clients automatically.
i hope has idea or can give me command sample information:
- ssid: wlannetwork
- password: password123
thanks
i found way add wifi profile.
at first export existing wifi profile:
netsh wlan export profile name="wifinetwork" folder="c:\path\" key=clear
than xml file following style:
<?xml version="1.0"?> <wlanprofile xmlns="http://www.microsoft.com/networking/wlan/profile/v1"> <name>wifinetwork</name> <ssidconfig> <ssid> <hex>123456789abcdef</hex> <name>wifinetwork</name> </ssid> </ssidconfig> <connectiontype>ess</connectiontype> <connectionmode>auto</connectionmode> <msm> <security> <authencryption> <authentication>wpa2psk</authentication> <encryption>aes</encryption> <useonex>false</useonex> </authencryption> <sharedkey> <keytype>passphrase</keytype> <protected>false</protected> <keymaterial>password123</keymaterial> </sharedkey> </security> </msm>
than can modify file , import add wifi command:
netsh wlan add profile filename="c:\path\wifinetwork.xml"
check profiles with:
netsh wlan show profile
i hope information.
Comments
Post a Comment