How to make a bat file cmd that exports and imports WIFI profiles

JoakimSV 40 Reputation points

How to make a bat file cmd that exports and imports WIFI profiles to a USB stick

I want the following options:

1 Export 1 spesific WIFI profile

2 Export all stored WIFI profiles

3 Iimport 1 specific WIFI profile

4 Import all stored WIFI profiles

5 Exit

And i do not want to write the username for the folder/file path

The case is that i want to import wifi(s) profile(s) to computer(s) from another location, and when the device is in range of the imported WIFI profile it will connect

BONUS, is it also possible to retrieve the WIFI profile(s) in recovery mode? and if so, how??


Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,162 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 43,971 Reputation points


    Thank you for posting your query.

    Kindly follow the steps provided below to resolve your issue.

    Batch files for backing up and restoring Windows wifi networks


    @ECHO OFFREM This will export all wifi profiles to the current folder. Each profile has its own XML file.netsh wlan export profile key=clear



    @ECHO OFFREM This will loop through all *.xml files in the current folder and import the profiles FORFILES /M *.xml /C "cmd /c netsh wlan add profile @path"

    Go to this link for your reference and other troubleshooting procedures

    Note: This is a non-Microsoft website kindly take precautions before downloading anything.

    Do not hesitate to message us if you need further assistance.

    If the answer is helpful kindly click "Accept as Answer" and up vote it.

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    Comments have been turned off. Learn more