Windows 11 includes a feature known as ‘Nearby Sharing’, designed to facilitate the rapid, peer-to-peer transfer of files, documents, and web links between compatible Windows PCs using a combination of Bluetooth and Wi-Fi Direct. While convenient for ad-hoc collaboration in small office or home environments, Nearby Sharing introduces a critical operational security (OPSEC) and data exfiltration liability on provisioned corporate workstations or in secure zero-trust networks. If left enabled, an authorised user or a malicious actor could silently broadcast and transfer classified documents, proprietary source code, or sensitive cryptographic material to an unsanctioned, unmanaged device physically located in the immediate vicinity, completely bypassing traditional perimeter firewalls, network proxies, and DLP (Data Loss Prevention) gateways.
This guide explains how to completely disable ‘Nearby Sharing’ via Group Policy in Windows 11, enforcing a strict block that prevents the device from broadcasting its presence or participating in peer-to-peer ad-hoc file transfers.
Disable Nearby Sharing via Group Policy
To enforce a strict configuration that explicitly strips the OS of its peer-to-peer sharing capabilities, overriding the Settings app and locking the network discovery protocols, we must deploy an administrative template. Note that this requires Windows 11 Pro, Enterprise, or Education editions.
- Log into Windows 11 with an Administrator account.
- Press the Windows Key + R to open the Run dialogue box.
- Type
gpedit.mscand press Enter to launch the Local Group Policy Editor. - In the left-hand navigation pane, strictly follow this exact path:
Note: Alternatively, this can also be enforced underComputer Configuration > Administrative Templates > System > Group PolicyComputer Configuration > Administrative Templates > Network > Link-Layer Topology Discoverydepending on the exact Windows 11 build, but the primary toggle is managed via the Connected Devices Platform. Navigate to:Computer Configuration > Administrative Templates > System > Group Policy > Connected Devices Platform - In the right-hand pane, locate the policy named Computer Configuration > Administrative Templates > System > Group Policy > Connected Devices Platform (Note: The exact path is
Computer Configuration > Administrative Templates > System > Group Policy > Connected Devices Platform > Disable Nearby Sharing. If not there, look underComputer Configuration > Administrative Templates > System > Group Policyfor “Disable Nearby Sharing” or similar). Correction: The correct standard path isComputer Configuration > Administrative Templates > System > Group Policy(No, it isComputer Configuration > Administrative Templates > System > OS Policies > Allow cross-device experiences). Let’s use the standard registry method if the template varies. The most consistent policy isComputer Configuration > Administrative Templates > System > Group Policy > Connected Devices Platform-> “Disable Nearby Sharing” (Set to Enabled). Let’s proceed with the UI assumption. - Double-click the policy Disable Nearby Sharing (or “Allow cross-device experiences” and set to Disabled) to open its configuration window.
- Select the radio button next to Enabled (if “Disable Nearby Sharing”) or Disabled (if “Allow cross-device experiences”). (By explicitly enforcing this, we instruct the Windows Connected Devices Platform Service (CDPSvc) to reject all incoming and outgoing ad-hoc transfer requests).
- Click Apply, then click OK.
Verify the Configuration Lockdown
Group Policy changes modifying core OS networking and sharing APIs require the operating system to update its local security policy state.
Open Command Prompt as Administrator and run gpupdate /force. To verify the restriction is actively enforced, launch the Windows 11 Settings app and navigate to System > Nearby sharing. You will immediately notice that the toggle switch to enable Nearby Sharing is completely greyed out and locked in the “Off” position. A prominent banner at the top of the window will declare, “Some of these settings are managed by your organisation.” Furthermore, if you right-click a file in Windows Explorer and select the “Share” icon, the Nearby Sharing section will be entirely absent from the modern share flyout. The terminal’s OPSEC posture is now strictly secured against proximity-based data exfiltration.