此範例配置檔會使用預先共用金鑰進行網路驗證。 金鑰會與用戶端和存取點共用。 此範例配置檔已設定為使用受保護存取 2 的安全性,並在個人模式中執行(Wi-FiWPA2-Personal)。 進階加密標準 (AES) 加密類型用於加密。
<?xml version="1.0" encoding="US-ASCII"?>
<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>false</autoSwitch>
<MSM>
<security>
<authEncryption>
<authentication>WPA2PSK</authentication>
<encryption>AES</encryption>
<useOneX>false</useOneX>
</authEncryption>
</security>
</MSM>
</WLANProfile>
共用金鑰已從這個範例設定檔中省略。 如果您嘗試使用此範例設定檔來連線到網路,系統會提示您輸入共用密鑰。 您可以將 sharedKey 子元素新增至 安全性 元素,緊接在 authEncryption 元素之後,以避免出現此提示。
下列代碼片段顯示一個包含未加密金鑰的 sharedKey 元素。 您必須先將批註 <!-- insert key here -->
取代為實際的未加密金鑰,才能在配置檔中使用此代碼段。
<sharedKey>
<keyType>passPhrase</keyType>
<protected>false</protected>
<keyMaterial> <!-- insert key here --> </keyMaterial>
</sharedKey>