Is it possible to deploy AOVPN user tunnel using GPO

James Edmonds 831 Reputation points
2022-02-01T14:53:22.18+00:00

Hi there,

I am deploying an always on VPN server.
As we do not currently use Intune or SCCM, I am hoping to deploy the client side of things using GPOs.

For the user tunnel, the powershell script to create the VPN connection must be run as an admin, but in the user's security context.
Is it possible, to deploy a group policy login script that meets those conditions, and can deploy the VPN profile to the users account?

I am not sure if GP scripts run with admin privileges or not, but my guess is by default they do NOT run as administrator?

Many thanks.
James

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 40,076 Reputation points
    2022-02-02T10:52:41.153+00:00

    Hello JamesEdmonds,

    Unfortunately logon scripts use the interactive user session and can´t be set with elevated permissions on themselves.

    On the other hand, I never configured, but theoretically you can deploy Scheduled Tasks through GPO to run that script, and set to run with elevated rights, either administrator or NT AUTHORITY. Then set the trigger "At Logon" and "Any User"


    --If the reply is helpful, please Upvote and Accept as answer--


  2. James Edmonds 831 Reputation points
    2022-08-30T15:12:07.587+00:00

    Ended up using a lot of parts from Richard Hicks' AO VPN scripts, but rolling my own that deploys both user and device tunnels as "AllUserConnection" VPNs, run as SYSTEM at system startup.
    It uses a small CSV to record VPN profile versions, in case we need to push new versions at later dates.

    So far, seems to be working quite well.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.