Solved

netsh wlan

Posted on 2014-02-06
4
381 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
[X]
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
  • 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
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…

733 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