Copying saved Wi-fi networks between Windows computers

I am looking to upgrade my laptop and want to know if there is a way to transfer my settings from the old one so that I don’t have to ask for passwords again at every place I go. Is this possible? If so, how do I do it?
ETA: I currently have a Windows laptop, and will be buying another Windows laptop.

You used to be able to do this in Windows 7 (see these instructions). But I’m clicking around in Windows 10, and it looks like the “copy wifi settings to USB drive” feature has been removed. Shame.

EDIT: I just found that there’s a way to do this on the commandline. It’s a bit more difficult, but looks like it’ll work for you. Try these directions.

If you just log in to Windows with your Microsoft account from both computers, it should automatically sync your WiFi passwords… I think it works from Win 7 - Win 10

Limited application, because (A) not everyone uses a Microsoft account to log into any computer, and (B) how do you log into a Microsoft account to sync Wi-Fi settings if you can’t get on Wi-Fi to begin with?

Definitely, but it probably fills a pretty typical use case (home user who can get their home wifi password, but doesn’t want to retype all the ones they encountered at work, the cafes, friends’ houses, etc.). By default now Windows pesters you to log in and you have to jump through a small hoop or two to not log in.