0

This thread describes how to add a wifi profile. I need to add 1 profile as connectionMode "auto" and a second profile with connectionMode "manual". A main connection and backup wifi connection.

Can both of these be added to the same .xml file or should I create 2 separate .xml files?

<?xml version="1.0"?>
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
    <name>WifiNetwork</name>
    <SSIDConfig>
        <SSID>
            <hex>576966694E6574776F726B</hex>
            <name>WifiNetwork1</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>Password123</keyMaterial>
            </sharedKey>
        </security>
    </MSM>
</WLANProfile>

<?xml version="1.0"?>
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
    <name>WifiNetwork</name>
    <SSIDConfig>
        <SSID>
            <hex>576966694E6574776F726B</hex>
            <name>WifiNetwork2</name>
        </SSID>
    </SSIDConfig>
    <connectionType>ESS</connectionType>
    <connectionMode>manual</connectionMode>
    <MSM>
        <security>
            <authEncryption>
                <authentication>WPA2PSK</authentication>
                <encryption>AES</encryption>
                <useOneX>false</useOneX>
            </authEncryption>
            <sharedKey>
                <keyType>passPhrase</keyType>
                <protected>false</protected>
                <keyMaterial>Password123</keyMaterial>
            </sharedKey>
        </security>
    </MSM>
</WLANProfile>
FHC
  • 71
  • 7
  • Yes. How? What did you try yourself? There [a lot of examples in stackoverflow how deal with `xml` files](https://stackoverflow.com/search?q=PowerShell+%5Bxml%5D+parse). – iRon Aug 12 '22 at 16:14
  • In all the examples I could find, they add 1 wifi connection. I was wondering if anyone who had setup 2 wifi connections knew if it made more sense to include those in a single xml file or if it was better to include them separately. Any pros or cons with either approach. I'll test it out myself and post the results, could save someone a few minutes in the future. – FHC Aug 13 '22 at 18:51
  • Couldn't you just try with multiple yourself and see what happens? When you do come back here and update us with an answer :) – Daniel Aug 14 '22 at 00:08

0 Answers0