Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

netsh wlan

Posted on 2014-02-06
4
380 Views
Last Modified: 2014-02-13
Hi
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?
0
Comment
Question by:PAMurillo
  • 2
  • 2
4 Comments
 
LVL 25

Expert Comment

by:Zephyr ICT
ID: 39841160
You could put the commands to import into a batch file?
Example:

@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.
pause

Open in new window


You can omit the pause if needed...
0
 

Author Comment

by:PAMurillo
ID: 39843550
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.
0
 
LVL 25

Accepted Solution

by:
Zephyr ICT earned 500 total points
ID: 39844213
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.

$path="C:\WirelessProfiles"
$pathready=$null

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{
$filepath=$_.FullName
netsh wlan add profile filename=$filepath user=all
}
}

Open in new window

0
 

Author Closing Comment

by:PAMurillo
ID: 39857210
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
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question