• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 390
  • Last Modified:

netsh wlan

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
PAMurillo
Asked:
PAMurillo
  • 2
  • 2
1 Solution
 
Zephyr ICTCloud ArchitectCommented:
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
 
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.
0
 
Zephyr ICTCloud 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.

$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
 
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
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now