Run script with static input no user input


First time here. I have a script that requires userinput and a parameter.
I need to hardcode this into the script because it needs to run without any user input via Intune and SCCM.

What I need is a way to Remove both user and Device Always on VPN tunnels.

Instead of asking for Tunnel name and parameter I just want that built into it.
Should run with tunnel name = MyTunnel and parameter -DeviceTunnel for example.

The script I will use is from Richard Hicks:

Help is much appreciated and could be extremely helpful also I might be able to use a such solution for other scripts from the community.

Welcome to the forum. :wave:t4:

Why don’t you provide the needed parameter value on the command line?

Regardless of that: We do not customize or refactor code you’ve found on the internet. We expect you to make own attempt first to get your task done or to solve your problem.

You could contact the author of the script and ask for help if you’re not able to modify it yourself.