Skip to content

Commit 3697c79

Browse files
Merge pull request #310710 from fabferri/patch-8
Document VPN profile issues and solutions for Windows 11
2 parents 54e17d8 + 210f599 commit 3697c79

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

articles/vpn-gateway/vpn-gateway-troubleshoot-vpn-point-to-site-connection-problems.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,49 @@ This problem might occur if you're trying to open the site-to-point VPN connecti
150150

151151
Open the VPN package directly instead of opening it from the shortcut.
152152

153+
## VPN profile is repeatedly deleted and recreated on Windows 11
154+
155+
### Symptom
156+
157+
- The VPN connection disconnects during, or shortly after, an Intune synchronization.
158+
- The VPN profile appears to be deleted and then reprovisioned, even though no configuration changes were made.
159+
- This behavior is observed primarily on Windows 11 devices.
160+
161+
### Cause
162+
163+
This issue occurs due to differences in how Intune and Windows handle the VPN profile XML:
164+
- During an Intune sync, Intune compares the VPN profile assigned to the device with the profile currently present on the system.
165+
- Windows does not store the original VPN profile XML exactly as it was provided to Intune. When queried, Windows regenerates the XML representation of the profile.
166+
- The regenerated XML may differ in formatting, ordering, or normalization from the original XML uploaded to Intune.
167+
- Although the effective VPN configuration is the same, these formatting differences can cause Intune to interpret the profile as changed.
168+
- When Intune detects a difference, it deletes the existing VPN profile and provisions a new one, which causes the VPN connection to disconnect.
169+
170+
### Solution
171+
172+
To prevent unnecessary deletion and recreation of the VPN profile, ensure that the XML profile used in Intune matches the format generated by Windows.
173+
The recommended approach is to extract the profile XML from a device where the VPN profile is already provisioned and working correctly.
174+
175+
1. Provision a VPN profile through Intune that includes all required settings.
176+
177+
1. On a Windows device with the correctly applied profile, open PowerShell and retrieve the list of provisioned VPN profiles:
178+
```
179+
$vpns = Get-CimInstance -Namespace root\cimv2\mdm\dmmap -ClassName MDM_VPNv2_01
180+
```
181+
182+
1. Identify the correct profile by reviewing the InstanceID value:
183+
```
184+
$vpns[0].InstanceID
185+
```
186+
187+
1. Export the profile XML to a file:
188+
```
189+
[System.IO.File]::WriteAllText("VPN-Corrected.xml", $vpns[0].ProfileXML)
190+
```
191+
192+
1. Use the exported XML file as the VPN profile definition in Intune
193+
194+
Using the XML generated by Windows helps ensure consistency between the profile stored on the device and the profile evaluated by Intune, reducing the likelihood of profile deletion and VPN disconnections during sync.
195+
153196
## Can't install the VPN client
154197

155198
### Cause

0 commit comments

Comments
 (0)