netsh wlan

I was able to export ALL my wireless profiles from my old Windows 7 computer (into a folder with numerous .xml files).  I need to import them into my new computer and do not want to do it one at a time.

Is there a command to do this?
Who is Participating?
Zephyr ICTConnect With a Mentor Cloud ArchitectCommented:
I'm not sure about a command line... Though you could use a simple Powershell function like the one shown under, it will just import all WLAN profiles from a folder.


function import_wifi_profiles{
 #check default path.
 do {
 $pathready = Test-Path $path
 if ($pathready -eq $false){
 $path=Read-Host "Default import path not found"
 } until ($pathready -eq $true)

$path | Get-ChildItem | ForEach-Object{
netsh wlan add profile filename=$filepath user=all

Open in new window

Zephyr ICTCloud ArchitectCommented:
You could put the commands to import into a batch file?

@echo off
echo This will import your saved wifi profiles 

netsh wlan add profile filename="your-filename1.xml"
netsh wlan add profile filename="your-filename2.xml"
netsh wlan add profile filename="your-filename3.xml"

echo DONE! Press a key to exit.

Open in new window

You can omit the pause if needed...
PAMurilloAuthor Commented:
Sorry, I thought my previous comment was posted.
I have about 700 wireless profiles so entering each as a line in a batch file would be similar to importing them one at a time.
Isn't there a way to import all of them at one time?

I know I did this when I set up my previous computer but the command is eluding me.
PAMurilloAuthor Commented:
Thank you for your help.  I know there is another way to import the profiles using a single line because I did it before.  Anyway the PowerShell function worked. thank you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.