iphase.dk Michael Mardahl, MVP
Keeping Always On VPN - always on?
>> The Problem
The Microsoft Always On VPN Solution pushed by Microsoft as the successor to DirectAccess is a great tool for remote workers. Despite the name, user tunnel connections don't always auto-connect, even with "AlwaysOn" configured in the ProfileXML or Intune configuration policy.
Some hacks include scheduling the "rasdial" command, but wouldn't you rather know why it stopped auto-connecting?
>> Why is it not auto connecting?
This might happen because the user manually disconnected the user tunnel, or for unexplained reasons. What happens is the VPN connection gets added to a registry list called AUTOTRIGGERDISABLEDPROFILELIST.
The AUTOTRIGGERDISABLEDPROFILELIST property is located at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan\Config
This is a REG_MULTI_SZ property that maintains profiles in a disconnected state, surviving reboots.
>> Can Intune help me fix this?
You could use PowerShell to remove unwanted entries, or create a .intunewin package with a detection rule.
For the detection method:
>> [powershell]
$connectionName = "Always On VPN Connection Name"
if((Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\RasMan\Config | select AutoTriggerDisabledProfilesList -ExpandProperty AutoTriggerDisabledProfilesList) -icontains $connectionName){
Write-Host "Found connection: $connectionName in disabled profile list!"
exit 1
}
>> Can I disable the user's ability to disconnect?
Microsoft has a device CSP you can deploy with a custom OMA-URI:
./Device/Vendor/MSFT/VPNv2/{ProfileName}/DisableDisconnectButton
Remember to include %20 for spaces in your VPN profile name.
Read more about this CSP at: VPNv2 CSP Documentation (https://learn.microsoft.com/en-us/windows/client-management/mdm/vpnv2-csp#deviceprofilenamedisabledisconnectbutton)
>> Final thoughts
Adding a fix via Intune complements the fact that Intune is the preferred distribution mechanism for Always On VPN profiles. Even though this seems like a bug, it's a feature, and as such it might never end up on the troubleshooting page.
C:\IPHASE\POSTS\INTUNE\KEEPIN~1.TXT
1 Help 3 Home 5 About 7 Posts 8 Contact 10 LinkdIn
imagevwr.exe