🔑 Peer-to-Peer Connections / Direct PC Access
This feature allows:
- Direct connection to Windows PCs
- Reduced dependency on brokers/gateways (in certain scenarios)
- Enhanced performance for local or hybrid connectivity
🎯 Benefits
- ⚡ Lower latency connections
- 🔄 Improved user experience
- 🧩 Supports hybrid and edge scenarios
- 🛠️ Better troubleshooting (direct path visibility)
💻 Method 1: PowerShell (Recommended for Quick Deployment)
✅ User Context Script
$RegPath = "HKCU:\Software\Microsoft\WindowsApp\Flights"
New-Item -Path $RegPath -Force -ErrorAction SilentlyContinue
New-ItemProperty -Path $RegPath -Name "PeerToPeerConnectionsEnabled" -PropertyType DWORD -Value 1 -Force
📌 Notes
- Must run in user context
- Ideal for:
- Nerdio Scripted Actions
- Intune remediation scripts
- Login scripts
🏢 Method 2: Group Policy (GPO)
Because this is an HKCU setting, deployment must target users.
Option A: Group Policy Preferences (Recommended)
Steps:
- Open Group Policy Management
- Edit your user GPO
- Navigate to:
User Configuration → Preferences → Windows Settings → Registry
- Create a new Registry Item:
| Setting | Value |
|---|---|
| Action | Update |
| Hive | HKEY_CURRENT_USER |
| Key Path | Software\Microsoft\WindowsApp\Flights |
| Value Name | PeerToPeerConnectionsEnabled |
| Value Type | REG_DWORD |
| Value Data | 1 |
Option B: Logon Script (Alternative)
reg add "HKCU\Software\Microsoft\WindowsApp\Flights" /v PeerToPeerConnectionsEnabled /t REG_DWORD /d 1 /f
📌 GPO Considerations
- Applies at user logon
- Requires:
- Windows App installed
- Good for domain-joined or hybrid environments
📱 Method 3: Microsoft Intune (Modern / AVD Recommended)
Since this is an HKCU setting, we must deploy in user context
Option A: Intune PowerShell Script (Best Practice)
Steps:
- Go to Devices → Scripts → Add → Windows 10 and later
- Upload script:
$RegPath = "HKCU:\Software\Microsoft\WindowsApp\Flights"
New-Item -Path $RegPath -Force -ErrorAction SilentlyContinue
New-ItemProperty -Path $RegPath -Name "PeerToPeerConnectionsEnabled" -PropertyType DWORD -Value 1 -Force
- Configure:
| Setting | Value |
|---|---|
| Run this script using logged on credentials | ✅ Yes |
| Run script in 64-bit PowerShell | ✅ Yes |
Option B: Intune Proactive Remediation (Advanced)
Detection Script
$path = "HKCU:\Software\Microsoft\WindowsApp\Flights"
$value = Get-ItemProperty -Path $path -Name "PeerToPeerConnectionsEnabled" -ErrorAction SilentlyContinue
if ($value.PeerToPeerConnectionsEnabled -eq 1) {
Write-Output "Compliant"
exit 0
} else {
exit 1
}
Remediation Script
$RegPath = "HKCU:\Software\Microsoft\WindowsApp\Flights"
New-Item -Path $RegPath -Force -ErrorAction SilentlyContinue
New-ItemProperty -Path $RegPath -Name "PeerToPeerConnectionsEnabled" -PropertyType DWORD -Value 1 -Force
📌 Intune Considerations
- Best for:
- AVD Entra-joined environments
- Windows 365
- Ensures:
- Continuous compliance
- Self-healing configuration
🧠 Operational Considerations
⚠️ Security
- This enables direct connectivity paths
- Validate against:
- Conditional Access policies
- Network segmentation
- Zero Trust design
🔄 Change Management
- Pilot before full rollout
- Validate:
- User experience
- Redirection behaviour
- Connectivity paths
📊 Monitoring
- Track:
- Connection performance
- User feedback
- AVD session metrics
🚀 Summary
| Deployment Method | Best Use Case |
|---|---|
| PowerShell | Quick deployment / testing |
| GPO | Hybrid / domain environments |
| Intune | Modern AVD / W365 environments |
💡 Pro Tip (Great Blog Close)
👉 This is a perfect example of where the Windows App is evolving faster than its UI
Many of the most powerful features today are:
- Hidden
- Registry-controlled
- Not yet fully documented
Click Here To Return To Blog