Issue deploying VPN profile to AWS VPN client via Intune

Hi everyone,

I came across an old thread that was very helpful and I was able to use it to deploy a VPN profile with powershell and packaging it as a Intune win32 app.

Here’s the original for reference: https://www.reddit.com/r/sysadmin/comments/r0e97o/script_to_create_profile_on_aws_client_vpn/iegbevm/?context=3

Here is the script: https://pastebin.com/3KuseVdG

I was asked to deploy another profile and decided to use the same script but plugging in the new details like profile name, endpoint ID, region, cert, and file name. The fields that require changes are encapsulated between **(IE: *File Name.ovpn*). It does successfully deploy via intune and when I compare the deployed profile vs the original profile that was sent to me, all looks correct.

The issue is when I try to connect with the profile deployed via intune I receive a “The VPN process failed to start. The port is already in use by another process”.

I have manually uploaded the VPN profile just to ensure it works and I am able to connect just fine. I believe the issue may be with how the script is deploying it. Not sure if the script can only deploy one profile and require certain changes if you want to use the same script to deploy a different profile. Unfortunately, my powershell is not great but I am working on honing this skill.

Would someone be able to look at this script and see if I am doing something wrong or if there’s a better approach? I may be asked to deploy other VPN profiles in the future.

Let me know if further information is needed for assistance.

Thanks in advance for any help or guidance provided!

did you ever get to resolve this ? just got into this and I have 6 profiles I need to create.

Aside from that, did you deploy the any file along with the setup file ?

I did not. Had some other fires to put out and this was put on the back burner. The script was effectively only creating the .ovpn file and nothing else.

I was able to get it working by importing the files from a blob storage to the computer