Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / Add Wireless Wi-Fi Profiles on Windows Devices via Export/Import or GPO

July 13, 2026

Add Wireless Wi-Fi Profiles on Windows Devices via Export/Import or GPO

In Windows, you can deploy pre-configured wireless (WLAN) profiles to client computers before they first connect to target Wi-Fi networks. Once a device discovers a matching Wi‑Fi network, it automatically connects using the predefined settings in the WLAN profile. This allows administrators to deploy WLAN connection settings to computers in advance, eliminating the need for manual Wi-Fi configuration on each computer. This is especially useful if the target wireless network is not currently available. In this post, I’ll cover how to export a configured Wi-Fi profile from one computer and import it to another, as well as how to use Group Policy to deploy Wi-Fi profiles to devices joined to an Active Directory domain.

Contents:
  • Export and Import Wi-Fi (WLAN) Profiles in Windows with Netsh
  • Deploying Wi-Fi Profiles to Windows Computers with Group Policy

Windows WLAN profiles contain saved settings for Wi-Fi networks, including the SSID, password (key), security settings, and used protocols. These settings allow your device to automatically connect to the wireless network.

Export and Import Wi-Fi (WLAN) Profiles in Windows with Netsh

After configuring a wireless connection on one Windows computer, you can export the configured Wi-Fi profile to an XML file and deploy it to other computers. This can be done using the built-in netsh command-line tool.

To list all saved WLAN profiles on a computer, run:
netsh wlan show profiles

To export a specific Wi-Fi profile (by its name) to a folder, use:

netsh wlan export profile name="woshub" key=clear folder="C:\Backup"

Thekey=clear option used to export the Wi-Fi security key (password) as plain text. Skipping this option exports the Wi-Fi key in an encrypted form that is protected by the local computer’s encryption keys, which means the key cannot be decrypted or imported for use on another computer.

Export Wi-Fi profile in Windows using netsh wlan command

The WLAN profile is exported as an XML file containing all the wireless network’s connection settings, including the SSID and Wi-Fi password (in plain text when key=clear is used).

view XML file with wlan profile

You can copy this XML file to another computer and import the Wi-Fi profile using the following command:

netsh wlan add profile filename="C:\Backup\Wi-Fi-woshub.xml"

Verify that the profile has been imported successfully and appears in the list of available WLAN profiles:

netsh wlan show profiles

By default, an imported WLAN profile is available to all users of the computer. To import the profile for the current user only, add the user=current option:

netsh wlan add profile filename="C:\Backup\Wi-Fi-woshub.xml" user=current

To assign the highest priority to the imported WLAN profile, run:

netsh wlan set profileorder name="woshub" interface="Wi-Fi" priority=1

Note. To implement this mode, set Windows to automatically switch to the strongest Wi-Fi access point.

netsh wlan set profileorder name="woshub" interface="Wi-Fi" priority=1

To connect to the wireless network using the imported profile from the command prompt (instead of the GUI), run:

netsh wlan connect name="woshub"

Since the WLAN profile is stored as a plain XML file, it can be edited manually before deployment. For example, you can change the network SSID, update the security key, or modify other connection settings.

Some commonly used XML options include:

  • <enableRandomization>true</enableRandomization> – enable MAC address randomization for Wi-Fi connections
  • <nonBroadcast>true</nonBroadcast> – set that the wireless network uses a hidden (non-broadcast) SSID
  • <connectionMode>auto</connectionMode> – enableWindows to automatically connect to the network whenever it is within range.

Edit XML file containing WLAN profile settings

The Microsoft WLAN Profile documentation provides detailed information on advanced WLAN profile settings and the complete XML schema.

You can also use PowerShell to automate the export of all saved Wi-Fi profiles from one computer and import them on another.

Export all saved WLAN profiles to a folder:

$FolderPath = "$env:USERPROFILE\Desktop\WiFi"
if (!(Test-Path $FolderPath)) {
New-Item -Path $FolderPath -ItemType Directory
}
netsh wlan export profile folder="$FolderPath" key=clear

Copy the exported folder to the target computer and import all WLAN profiles with the following PowerShell script:

$WLANs = Get-ChildItem "$env:USERPROFILE\Desktop\WiFi" | Select-Object Name
foreach ($network in $WLANs) {
netsh wlan add profile filename=$($network.Name) user=all
}

Deploying Wi-Fi Profiles to Windows Computers with Group Policy

Group Policy provides an efficient way to automatically deploy Wi-Fi profiles to domain-joined computers. There are two common approaches:

  • Configure a logon/startup script in GPO that runs once on each computer and imports a Wi-Fi profile from an XML file.
  • Use native Wireless Network (IEEE 802.11) Policies. This approach is intended for enterprise wireless networks that use certificate-based authentication or a RADIUS server. However, it cannot be used to distribute a pre-shared key (PSK) for WPA/WPA2/WPA3-Personal wireless networks.

The simplest deployment method is to use a Group Policy script that imports the WLAN profile during computer startup or user logon.

  1. Prepare an XML file containing the configured WLAN profiles. You can either create it manually or export it from a reference computer using the netsh wlan export profile command.
  2. Create a batch file named add_wifi_profile.bat containing the following commands:REM If the file C:\wlanprofileflag.txt exists, then the profile has already been imported, go to _END
    IF EXIST C:\wlanprofileflag.txt GOTO _END
    netsh wlan add profile filename="\\woshub.com\netlogon\Wi-Fi-profile.xml" user=all >> C:\wlanprofileflag.txt
    netsh wlan set profileorder name="woshub" interface="Wi-Fi" priority=1
    GOTO :EOF
    :_END
  3. This GPO startup script is designed to run only once on each computer. It checks for the presence of a flag file (wlanprofileflag.txt) before importing the WLAN profile, preventing the script from running again on subsequent startups.
  4. Copy both the XML profile and the add_wifi_profile.bat file to the NETLOGON share on a domain controller.
  5. Create a new domain GPO and configure the batch file as a Startup script under Computer Configuration -> Policies -> Windows Settings -> Scripts (Startup/Shutdown) Startup script to import wi-fi (wlan) profiles to domain computers via GPO
Learn more about running batch or PowerShell logon scripts in Windows via GPO.

If the enterprise Wi-Fi authentication (for example, NPS and RADIUS) is used in your environment, you can deploy wireless network settings using the built-in Wireless Network (IEEE 802.11) Policies instead of a startup script. The policy is located at Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Wireless Network (IEEE 802.11) Policies.

Unlike the XML import method, Wireless Network (IEEE 802.11) Policies cannot be used to deploy pre-shared keys (PSKs) used by WPA/WPA2/WPA3-Personal networks. Instead, they are designed for enterprise authentication methods such as 802.1X with client certificates or RADIUS authentication using user or computer credentials.

If you import a WLAN profile XML file that contains a saved Wi-Fi password into a Wireless Network (IEEE 802.11) Policy, the pre-shared key is automatically removed. This behavior is by design, ensuring that Group Policy is used only for enterprise-class wireless authentication methods rather than deploying shared Wi-Fi passwords.

GPO: deploy Wireless Network (IEEE 802.11) Policies

0 comment
0
Facebook Twitter Google + Pinterest
Group PoliciesQuestions and AnswersWindows 10Windows 11
previous post
CrowdSec on Windows: From Installation to Threat Blocking

Related Reading

How to Move (Migrate) Windows Shares to a...

February 26, 2026

Monitor Windows Log Files in Real Time with...

March 26, 2026

Find a Process Causing High Disk Usage on...

July 16, 2025

Security Warnings When Opening RDP Files in Windows...

April 20, 2026

SMB over QUIC: Mount File Share over Internet...

December 24, 2025

Stop Windows Server from Auto-Shutdown Every Hour

February 11, 2026

Windows: Create (Install) a Service Manually

December 17, 2025

Automate Software and Settings Deployment with WinGet Configure...

November 20, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • CrowdSec on Windows: From Installation to Threat Blocking

    July 3, 2026
  • Manage Microsoft Store Apps with Store CLI in Windows 11 from Terminal

    July 2, 2026
  • Windows Sandbox on Windows 11: Enable, Configure, and Use

    June 10, 2026
  • How to Monitor Windows Machines with Zabbix

    May 26, 2026
  • Fixing Duplicate Security Identifier (SID) Issues in Windows

    May 25, 2026
  • Monitor a Folder for File Changes Using PowerShell and FileSystemWatcher

    May 15, 2026
  • Protect Windows Server from DDoS and Brute-Force Attacks with IPBan

    May 12, 2026
  • How to Force Uninstall ANY Stubborn Program in Windows

    May 7, 2026
  • How to Safely Disable IPv6 on Windows

    April 30, 2026
  • Updating UEFI Secure Boot Certificates on Windows Devices Explained

    April 20, 2026

Follow us

  • Facebook
  • Twitter
  • Youtube
  • Telegram
Popular Posts
  • How to Remove ‘Some Settings are Managed by Your Organization’ on Windows 11 or 10
  • How to Set a Custom Drive Icon in Windows
  • How to Prevent Users from Saving Files to Desktop, Downloads and Other Profile Folders
  • How to Enable or Disable Windows Defender Firewall
  • Configure NTP Time Source for Active Directory Domain
  • Exclude a Specific User or Computer from Group Policy
  • Configure Windows to Auto Restart/Shutdown with Task Scheduler
Footer Logo

@2014 - 2026 - Windows OS Hub. All about operating systems for sysadmins


Back To Top