This is a very basic method of setting up an L2TP VPN using a worklet.
Change the values: vpnName, serverAddress, yourPsk, authMethod
Get-VpnConnection -Name "vpnName"
Add-VpnConnection -AllUserConnection -Name "vpnName" -ServerAddress "serverAddress" -TunnelType L2tp -EncryptionLevel Optional -L2tpPsk "yourPsk" -AuthenticationMethod authMethod -Force
What needs added to the Evaluation Code so that the worklet doesn’t run if there is already a VPN connection?
Try the following:
Thank you for helping with this one!