Share via


Wi-Fi WPA2-Personal Profile Sample (Compact 7)

3/12/2014

This sample profile uses a pre-shared key for network authentication. The key is shared with the client and the access point. This sample profile is configured to use Wi-Fi Protected Access 2 security running in Personal mode (WPA2-Personal). Encryption uses the Advanced Encryption Standard (AES) cipher type.

<?xml version="1.0"?>
<WLANProfile xmlns="https://www.microsoft.com/networking/WLAN/profile/v1">
    <name>SampleWPA2PSK</name>
    <SSIDConfig>
        <SSID>
            <name>SampleWPA2PSK</name>
        </SSID>
    </SSIDConfig>
    <connectionType>ESS</connectionType>
    <connectionMode>auto</connectionMode>
    <autoSwitch>true</autoSwitch>
    <MSM>
        <security>
            <authEncryption>
                <authentication>WPA2PSK</authentication>
                <encryption>AES</encryption>
                <useOneX>false</useOneX>
            </authEncryption>
            <sharedKey>
              <keyType>passPhrase</keyType>
              <protected>false</protected>
              <keyMaterial> <!-- insert key here --> </keyMaterial>
            </sharedKey>
        </security>
    </MSM>
</WLANProfile>

If you use this sample profile to connect to a network, you must have a sharedKey child element added to the security element immediately following the authEncryption element.

The following code example shows a sharedKey element that contains a non-encrypted key. You must replace the comment <!-- insert key here --> with the actual non-encrypted key before you use this code example in a profile.

<sharedKey>
    <keyType>passPhrase</keyType>
    <protected>false</protected>
    <keyMaterial> <!-- insert key here --> </keyMaterial>
</sharedKey>

See Also

Tasks

Wi-Fi Non-Broadcast Profile Sample
Wi-Fi WPA-Enterprise with PEAP-MSCHAPv2 Profile Sample
Wi-Fi WPA-Enterprise with TLS Profile Sample
Wi-Fi WPA-Personal Profile Sample
Wi-Fi WPA2-Enterprise with PEAP-MSCHAPv2 Profile Sample
Wi-Fi WPA2-Enterprise with TLS Profile Sample

Other Resources

Wi-Fi Profile Samples