Skip to main content
mike_dp
New Member
September 12, 2016
Question

On connect script in Forticlient EMS

  • September 12, 2016
  • 3 replies
  • 19266 views

I'm trying to have an "On Connect Script" in Forticlient EMS. The goal is to execute the command gpupdate /force on clients whenever they connect to our SSL VPN because we have some clients always connecting from remote.

 

The admin guide doesn't have much info about this :

http://docs.fortinet.com/uploaded/files/3269/forticlient-ems-v1.0.2-admin-guide.pdf  

Page 68

 

And I tried something like this :

 

http://help.fortinet.com/fclient/olh/5-4-1/Content/FortiClient-5.4-Admin/1100_Remote%20Access/840_VPN%20tunnel%20and%20script+.htm

 

<on_connect>

<script>

<os>windows</os>

<script>

<script>

<![CDATA[ gpupdate /force ]]>

</script>

</script>

</script>

</on_connect>

 

Since it's already an On Connect Script box maybe I don't have to put all brackets but I also tried to put this in the XML config directly and didn't work.

 

Any clue?

    3 replies

    mike_dp
    mike_dpAuthor
    New Member
    September 16, 2016

    It was way simpler than I thought.

     

    I simply had to put gpupdate /force in the box and it works. Clients now update their group policies after a SSL VPN tunnel connection.

    bmduncan33
    New Member
    February 24, 2022

    What "box" are  you referring to?  I know this is an ancient post but maybe you are still around and will recall.  Thanks.

    AJITH
    New Member
    January 18, 2023

    Please try this, Its working for me.

     

    Regards

    Ajith M

     

    <on_connect>
    <script>
    <os>windows</os>
    <script><![CDATA[timeout /t 10 /nobreak
    gpupdate /force]]></script>
    </script>
    </on_connect>

    Rick2332
    New Member
    October 31, 2023

    How to confirm whether its working....can we check it in the logs.