Exclude Routes Windows 10 VPN

Anonymous
2021-06-30T19:28:25+00:00

I'm hoping to either modify my existing VPN connections on my windows computer or create a new VPN profile with the exclusion routes.
My VPN connection is a forced tunnel.
I came across this documentation Optimizing Office 365 traffic for remote workers with the native Windows 10 VPN client - Microsoft 365 Security | Microsoft Docs and I would like to implement something very similar. However, for testing purposes I would be interested in trying to exclude 204.79.197.215/32 for example.

I don't have access to Microsoft Intune. I would like to strictly stick to PowerShell if I could. An example of a PowerShell script in the above documentation under "Solution Development" however, another issue I have is I don't have a XML VPN profile...
We simple just use "Add-VPNConnection -Name 'NAME' -TunnelType 'SSTP' -ServerAddress 'URL' -AllUserConnection -Force -RememberCredential"

Any help would be greatly appreciated. I've been trying to implement this on and off for weeks.

Windows for home | Windows 10 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Anonymous
    2021-06-30T22:11:57+00:00

    Hi, I'm Robinson, an Independent Advisor and a Windows user like you.

    You can use these commands in PowerShell to manage the routes.

    route print to see all routes

    route delete 204.79.197.215 to delete a route

    You can use the command route /? to see more options for the command.

    To create an XML VPN profile

    1- Copy the example on this

    link https://docs.microsoft.com/en-us/windows/client...

    2-Paste in the Notepad

    3-Click on File > Save as

    4-Change the name for VPNProfile.xml then change the Save as type to all files

    0 comments No comments
  2. Anonymous
    2021-07-01T12:18:37+00:00

    I don't have a route to 204.79.197.215 other than the 0.0.0.0 0.0.0.0 to my VPN gateway. That is why I want to add the exclude routes.

    Creating a VPN profile from XML would also work because I can add the exclude routes to the XML before creating the profile.

    Do you know how I can view my current VPN profile in XML? I would like to use it as a template/guide if I could.

    I'm also guessing there is a PowerShell script to take the XML to build out the VPN profile.

    0 comments No comments
  3. Anonymous
    2021-07-02T12:01:13+00:00

    These links may help you.

    Configuring Windows 10 VPN Connection Profiles using PowerShell.

    https://channel9.msdn.com/Series/Windows-10-Net...

    VpnClient

    This reference provides cmdlet descriptions and syntax for all VPN Client-specific cmdlets. It lists the cmdlets in alphabetical order.

    https://docs.microsoft.com/en-us/powershell/mod...

    https://docs.microsoft.com/en-us/powershell/mod...

    0 comments No comments
  4. Anonymous
    2021-07-02T14:37:34+00:00

    I was able to build out a VPN XML profile with the exclusion routes. Do you know how I could take the XML file and import into Windows 10 so I can make it a VPN profile? Thank you again with your help Robinson!

    0 comments No comments
  5. Anonymous
    2021-07-03T18:59:42+00:00

    I'm sorry, I'm running out of possible fixes and solutions. Since this is an open forum, let's see if another member of the community has an alternative solution to the issue.

    0 comments No comments