Figure 1: Example of a wireless profile exported in XML format
Note that you do not need to specify any parameters; Just enter the following command:
netsh wlan export profile
If the directory name is not provided, Windows will automatically select the home directory of the user's personal folders. If you do not distinguish the profile, Windows will export all profiles.
Tip : After exporting a profile, you can change network settings. Right-click on the XML file and select Open With> Notepad (or your favorite file editor). Then edit and save the file. Be careful not to corrupt the schema in the XML file! If you are interested in editing the profile, check the detailed information about the schema from Microsoft's MSDN website here.
After exporting a profile, you can import it to another Vista or Windows 7 computer:
netsh wlan add profile filename = " PATH_AND_FILENAME .xml".
You can specify an interface to import profiles; This option is quite useful if the computer has multiple wireless adapters. You can also specify that you want to use profiles for all computer users, or only for current users. Here is an example of how to use both of these parameters:
netsh wlan add profile filename = " PATH_AND_FILENAME .xml" Interface = " Wireless Network Connection " user = current
If you do not specify the interface, Windows will add it to all interfaces by default. In addition, if no user parameters are specified, Windows will add profiles to all users.
Import and export wired authentication settings with Netsh (Windows Vista and Windows 7 only)
If you are performing 802.1X authentication on a wired network, you may find it useful to export and import your wired network profile in Windows Vista and Windows 7. (If you want to backup or transfer information only) For details about IP or DNS, see the next section The wired profile only includes authentication settings.
First, you can print the list of wired profiles and their settings:
netsh lan show profiles
Then, when ready to export the profile, use the following syntax:
netsh lan export profile folder = PATH_TO_FOLDER interface = " INTERFACE_NAME "
This command will create an ML file (see Figure 2 for example) in the directory you specified, and use the specified interface name; For example, Local Area Connection.xml .
It should be noted that identifying an interface is completely optional. If you do not specify the interface, Windows will export the profiles for all interfaces. However, you must specify a directory.
You can import a wired profile to another Windows Vista or Windows 7 computer using the following command:
netsh lan add profile filename = " PATH_AND_FILENAME .xml" interface = " INTERFACE_NAME "
Import and export the TCP / IP configuration with Netsh
If you assign static or DNS IP addresses to your computers, exporting and importing the TCP / IP configuration can be quite useful. You can save the settings to use for backup purposes, or use the configuration as a template to configure other computers quickly. For example, you can configure a computer with a static IP address and DNS details, export it, and then before importing to other computers, change the IP address to avoid address conflicts.
Note : Remember that some settings, such as the interface name, may vary according to the computers.
To dump or export the TCP / IP configuration, use the following command:
netsh -c interface dump> PATH_AND_FILENAME .txt
Tip : You can open and edit the configuration file in your favorite text editor (such as Notepad).
Use the following command to import the TCP / IP configuration:
netsh -f PATH_AND_FILENAME .txt
Transfer wireless network settings via USB
Windows Connect Now (WCN) provides wireless network profile copy to USB so you can easily distribute network settings (name, WEP or WPA / WPA2-PSK encryption settings, .) to computers and other wireless devices are not connected.
To export the wireless network profile to USB in Windows XP SP2 or SP3 and Windows Vista, you can use the Wireless Network Setup wizard. You can launch this wizard in a few different ways. For example:
WPA / WPA2-Enterprise is not supported by Windows Connect Now, but you can use Netsh to backup or transfer network profiles using WPA / WPA2 mode as described above.
To export wireless network profiles to a USB in Windows 7, open the profile or wireless network connection settings. One simple way is to click on the network icon in the system tray, right-click on the network name and select Properties. On the Connection tab, click "Copy this network profile to a USB flash drive".
To import a profile to a Windows XP, Vista, or Windows 7 computer, insert it into USB. When the AutoPlay dialog box appears, click on the "Connect to a Wireless Network link using Windows Connect Now" or "Wireless Network Setup Wizard". If the AutoPlay menu does not appear, you can initiate the import action by running SetupSNK.exe on the USB root directory.
Keep your settings safe
You now know how to export and import all major network settings. It is safe to keep backups or copies of network settings because it probably includes network keys!