Switching to a new computer, I had to export my WiFi profiles (network and passwords) and import them again on the new computer.
After googling a bit and some trial and error, this turned out to be the way to go:
Start an elevated command prompt on the old computer, create an empty folder somewhere and navigate to it. Then, run this command:
netsh wlan export profile
This will create a number of XML files in the current directory, one file for each WLAN profile. You can copy the folder over to your new computer now.
On the new computer, open an elevated command prompt as well, and navigate to the folder with all those XML files you copied over. Then, run this command:
forfiles /c "netsh netsh wlan add profile filename=\"\""@file\"\"""
Note that the double “netsh” is no mistake, it is needed due to a bug in the forfiles program which will not pass the initial “netsh” as part of the command line to the netsh program itself, resulting in a Problem where it ignores the “wlan” argument instead. And the crazy quoting is required so that instead of each
\"\"", a single doublequote is passed to netsh…
This will import all your WLAN profiles again. You can delete the folder with the XML files now. That’s it!