If you have multiple sites or as in our case, (construction)sites that come and go, you want an easy way to provide the Wifi keys to your users. Sure you can mail them around, update a list on the intranet. But would it not be convenient to automatically populate the list of WLAN profiles in your user’s notebooks?
To get this working you only have to run the following PowerShell script:
- List the available WLAN profiles on the machine.
[code]
netsh wlan show profiles
[/code]
[code]
netsh wlan export profile “SSID NAME” key=clear folder=”dir_to_xml_profiles”
[/code]
[code]
<pre>$XmlDirectory = “dir_to_xml_profiles”
Get-ChildItem $XmlDirectory | Where-Object {$_.extension -eq “.xml”} | ForEach-Object {netsh wlan add profile filename=($XmlDirectory+”\”+$_.name)}
[/code]
Get-ChildItem c:\NameOfDir | Where-Object {$_.name -like “Wi-FI*”} | ForEach-Object {netsh wlan add profile filename=(c:\NameOfDir+$_.name)}
just change NameOfDir with your dir name and copy/paste to powershell windows