Windows will connect to the wired network automatically in most cases. For wireless networks, you need to manually create wireless profile and add Network name, SSID, and security key. Manually adding wireless network works if you have just a couple of computers to connect. For configuring a large number or computers or making changes to wireless configuration to existing computers already deployed manual process will be too time consuming and inefficient.

Fortunately, by using batch commands and NETSH tool, it is possible to automate the deployment of wireless profile. The process is detailed below.

To view existing WLAN profiles:  netsh wlan show networks

To delete existing WLAN profile:  netsh wlan delete profile name=”profilename”

Steps to create automated script

  • Configure new wireless profile on a test computer.
  • Export WLAN profile to XML file: netsh wlan export profile name=”SSID”  This will export the WLAN configuration to .\ folder in XML format as Connection-SSID.XML
  • Import WLAN profile to the target computer: netsh wlan add profile filename=”c:\temp\filename.xml”  This will import the WLAN configuration.

To automate WLAN deployment

  • Copy the exported XML file to a USB key or a network share.
  • Create a windows CMD/batch file with commands to delete and add profiles as desired.

For additional information on netsh wlan command type netsh wlan /?

 For more details check out the technet article at