Hi,
Please try the following command in PowerShell to see if it was helpful.
e.g.
Add-VpnConnectionTriggerApplication -ConnectionName "Contoso" -ApplicationID "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe","Microsoft.RemoteDesktop_Contoso0987" -PassThru
ConnectionName : Contoso
ApplicationID : {C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe, Microsoft.RemoteDesktop_Contoso0987}
For more information about Add-VpnConnectionTriggerApplication command, please refer to the following article.
Add-VpnConnectionTriggerApplication
Besides using PowerShell Script to implement VPN triggered application, based on my research, you can configure desktop or Universal Windows Platform (UWP) apps to trigger a VPN connection. You can also configure per-app VPN and specify traffic rules for each app. See Traffic filters for more details.
Please refer to this article Configure app-triggered VPN for more details.
Best Regards,
Sunny
----------
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.