Solved

netsh wlan

Posted on 2014-02-06
4
377 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article is an update and follow-up of my previous article:   Storage 101: common concepts in the IT enterprise storage This time, I expand on more frequently used storage concepts.
For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now