Update: just use OpenConnect v8.00 or later. GlobalProtect support has been included in the "official" OpenConnect builds since version 8.00 . So GP support will be Just Work ™ with a recent official build.
---
You cannot do this with an official GP client. However, I recently expanded the fantastic OpenConnect open source VPN VPN client to support the GlobalProtect VPN PAN in SSL-VPN and IPsec / ESP modes. It acts as its own client, and you can run it from the command line completely automatically.
This is work in progress , but I am already using it for real work, and it works very well for me. It would be nice if other people checked it out and I would be happy for your feedback!
You will need to collect the globalprotect branch from this repository: https://github.com/dlenski/openconnect
... and then run it to verify it (you can omit the --certificate part if your VPN does not use a client certificate):
echo password | openconnect --user username --passwd-on-stdin \ --protocol=gp [--certificate=my_cert_with_pk.pem] \ gp-gateway-server.company.com --dump -vvv
(I have not tested this assembly under Windows yet, but the official OpenConnect assemblies are fully compatible with Windows, and there is nothing special about it.)
source share