Skip to content

Instantly share code, notes, and snippets.

@te-online
Last active March 16, 2017 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save te-online/7e9749cc481515ee7688ed9d14f0aebc to your computer and use it in GitHub Desktop.
Save te-online/7e9749cc481515ee7688ed9d14f0aebc to your computer and use it in GitHub Desktop.
MDT Script Series: Export and apply a prepared WiFi profile from a network share
<?xml version="1.0"?>
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
<name>%SSID-NAME%</name>
<SSIDConfig>
<SSID>
<hex>%HEX-OF-SSID-NAME%</hex>
<name>%SSID-NAME%</name>
</SSID>
</SSIDConfig>
<connectionType>ESS</connectionType>
<connectionMode>auto</connectionMode>
<MSM>
<security>
<authEncryption>
<authentication>WPA2PSK</authentication>
<encryption>AES</encryption>
<useOneX>false</useOneX>
</authEncryption>
<sharedKey>
<keyType>passPhrase</keyType>
<protected>false</protected>
<keyMaterial>%PASSPHRASE%</keyMaterial>
</sharedKey>
</security>
</MSM>
</WLANProfile>
# Export
netsh wlan export profile %SSIDName% folder=c:\temp
# Import
netsh wlan add profile "\\HOST\Deployment\WiFi\WIFI-PROFILE.xml"
# see https://community.spiceworks.com/how_to/24989-export-import-wireless-network-info-on-windows-machines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment