Thursday, March 22, 2012

Automate Windows Vista/7/8 Wifi Profile Importing using NETSH

If you work in an enterprise environment that provides wireless you may find it necessary to constantly be configuring WiFi profiles for your users as they aren't able to do it themselves. With more advanced security features you can  implement with 802.1x for instance you may find that simply trying to connect to the WiFi network and entering in your credentials won't work - you need more manual configuration.

Well screw that! Let's make a batch file and do this in 2 clicks!



To start you will need to configure a test machine with all the wireless profiles configured manually (for the last time!).

Once you have those setup, it's time to export those profiles with NETSH.

Open up a command prompt and type:

netsh wlan show profiles 

This will show all profiles you have configured on your test machine.

netsh wlan export profile name="wifiprofile1" folder="c:\wifiprofiles\" 

Feel free to use whatever local or network drive you'd like to save these profiles on instead of c:\wifiprofiles.

Now, lets create a batch file we can use to import these new profiles to other laptops. Make sure to create this batch file in the same folder you saved your profiles in unless you want to specify the full path. Create a new text file with notepad but be sure to save it as a .bat or .cmd.

The general setup is below; add more profiles as necessary.


@echo off
echo.
echo Importing 802.1x Profiles
echo.
netsh wlan add profile filename="wifiprofile1.xml" user=all
netsh wlan add profile filename="wifiprofile2.xml" user=all
pause
And that's it. Either host this folder on a network share for users or yourself to grab and import over the wired network during initial laptop deployment or put it on your image in advance. You can even include this during sysprep to do this automatically.

NETSH is a super powerful command line tool that I will elaborate on more in later posts. For now, enjoy our automation!

18 comments:

  1. Hello, thanks for the info. But when I import this over to another laptop from my test laptop then running the batch script, it ask for the Security key. Anyway I can automate so the security key is imported as well?

    ReplyDelete
  2. This wonderful person seems to have fixed it with this method: http://theether.net/kb/100166

    ReplyDelete
  3. That has not worked for me in the past due to the unreliable nature of wifi sharing. You might connect to the phone's personal hotspot before leaving the house. electricalshop.net

    ReplyDelete
  4. This is less expensive than another switch; organize extenders have the capacity of boosting your WiFi broadband system flag particularly in the difficult to-achieve corners of your flat/home. Old switches can even be utilized as a system extender.dual band vs tri band

    ReplyDelete
  5. Tragically, Windows 8 was not the achievement Microsoft had sought after, with numerous clients griping about the gigantic takeoff far from recognizable designs. how to start writing a story

    ReplyDelete
  6. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
    top-5-best-gopro-wifi-remotes

    ReplyDelete
  7. Many thanks for the great posting. I am glad I have taken the time to see this. nerdy wifi puns

    ReplyDelete
  8. Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors. Unique wifi names

    ReplyDelete
  9. Without doing this, you may get amazed about the quantity of projects that set themselves naturally and run when you start up your PC or fiber association. boost wifi laptop

    ReplyDelete
  10. I am all that much satisfied with the substance you have specified. I needed to thank you for this extraordinary article. lemigliorivpn

    ReplyDelete
  11. It is good to note that, the broadband service speed isn't just dependent on the package and ISP at hand but there are numerous other reasons that might need to be addressed.WiFi security Laguna Beach

    ReplyDelete
  12. Google goggles may simply be the greatest distinct advantage of all. It's still in its earliest stages, however the picture acknowledgment programming is looking a truly great and adaptable travel apparatus.https://www.techpally.com/office-makeover-without-budget/

    ReplyDelete
  13. Inside cameras are delicate. These favor a dry domain, yet can conform to temperatures inside the home. Witty Spy

    ReplyDelete
  14. This can result https://techeries.com/ in different programming stages being utilized making higher working expenses and extra complexities in the PC framework.

    ReplyDelete
  15. I am impressed. I don't think Ive met anyone who knows as much about this subject as you do. You are truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. Really, great blog you have got here. 192.168.0.254

    ReplyDelete
  16. There are likewise two sorts of hotspots that you can make. The first is a non-oversee Hotspot framework that you can make straight away utilizing your remote router. best wireless router

    ReplyDelete
  17. it isn't important to put on the most impressive level to get the best sign. A normal sign level would be sufficient for your standard use. long range wireless router

    ReplyDelete
  18. Thank you for sharing a bunch of this quality contents, I have bookmarked your blog. Please also explore advice from my site. I will be back for more quality contents. https://epektasiwifi.com/

    ReplyDelete