Automate VPN connection with certificate approval

I wish to automate the VPN connection.
Program used is Fortigate VPNOnly on a Windows 11Pro system.
I also have to approve a certificate while building up the tunnel.
What is the powershell script code to make this vpn connection with one click?
Anyone?

Willem,
Welcome to the forum. :wave:t3:

This forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request. But we’re happy to assist.

We actually expect you to make an own attempt at the first place to get your task done or to solve your problem. If you have done so already please document here what exactly you have done and show your code. Then we probably might be able to help you step further. :love_you_gesture:t3:

Regardless of that … I don’t know the program Fortigate VPNOnly but the VPN solutions I know usually are able to be configured with an auto connect. And what do you mean with “approve a certificate”? The certificate should be valid and should be accepted by the VPN app. :thinking: