<# Split vpn para axvpn.axoft.com Nota: No utilizar el cmdlet Add-VpnConnectionTriggerTrustedNetwork sin consultar antes con BackOffice The Add-VpnConnectionTriggerTrustedNetwork cmdlet adds Domain Name System (DNS) suffixes as trusted networks to the virtual private network (VPN) profile. When a DNS suffix that you add to the VPN profile is present on the physical interface on the client, the VPN connection does not start even if the client tries to access an application that is part of triggering properties. Ex: Add-VpnConnectionTriggerTrustedNetwork -ConnectionName "Axoft_PS" -DnsSuffix "axoft.com","otrodomain.com" -PassThru To change Network profile to private network (trusted), after connecting to axvpn.axoft.com execute the following: Get-NetConnectionProfile (take note of InterfaceIndex number of Axoft_PS) Set-NetConnectionProfile -InterfaceIndex 13 -NetworkCategory Private #> <# Genera la instancia elevada de Powershell #> if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { $arguments = "& '" +$myinvocation.mycommand.definition + "'" Start-Process powershell -Verb runAs -ArgumentList $arguments Break } <# Setea la ExecutionPolicy y genera la conexion de VPN con split tunneling #> Set-ExecutionPolicy Unrestricted Add-VpnConnection -Name Axoft_PS -ServerAddress axvpn.axoft.com -AllUserConnection -SplitTunneling Add-VpnConnectionRoute -ConnectionName Axoft_PS -DestinationPrefix 192.168.0.0/16