To do this for Windows PowerShell for example:
It’s however important that you run it with elevated permissions. You can use the Netsh WLAN command in command prompt, Windows PowerShell and Windows Terminal. In this article, we are going to take a look at how to use the netsh WLAN command in Windows. Export and Import Wireless Network Profiles.Changing Wireless Network Settings with Netsh WLAN.