KB Article | Forcepoint Support

Problem Description

When you configure a VPN network in Microsoft Azure Cloud to hold the Virtual Machine (VM), you must run a Forcepoint-supplied connection script, p2s_vpn_connect.ps1. This script connects the VM to the TRITON management server. Any time the TRITON management server is restarted, you must run the script again.

The script can be added to the Windows Task Scheduler on the TRITON management server so that runs automatically on startup. This saves administrators from having to manually run the script each time.

For instructions on installing and configuring Email Gateway for Office 365, see the TRITON AP-DATA Installation Guide.

Note: The TRITON AP-DATA Email Gateway for Microsoft Office 365 is a cloud-based VM that performs DLP on outbound Exchange Online email.


To add the script to the Windows Task Scheduler:
  1. Log on to the TRITON management server as an administrator.
  2. Open the Windows Control Panel and click Administrative Tools.
  3. In the Administrative Tools list, double-click Task Scheduler.
  4. In the Task Schduler window, click Task Scheduler Library in the left navigation pane, then click Create Task.
    Task Scheduler home
  5. On the General tab, enter a descriptive Name for the task.
  6. Under Security options, select Run whether user is logged on or not.
    Create Task
  7. Select the Triggers tab, then click New.
    Triggers tab
  8. In the New Trigger dialog box, use the Begin the task drop-down list to select At startup.
    New Trigger
  9. Mark the Repeat task every check box, then select 5 minutes from the drop-down list.
  10. In the For the duration of drop-down list, select Indefinitely, then click OK.
    New Trigger advanced settings
  11. Verify that the new trigger appears on the Trigger tab.
  12. Click the Actions tab and then click New.
    Create new action
  13. In the New Action dialog box, select Start a program from the Action drop-down list.
  14. In the Program/script field, enter powershell.exe.
    New Action
  15. In the Add arguments (optional) field, enter type -noexit "& 'path_of_script'", then click OK.
    For example:  -noexit "& 'C:\Program Files (x86)\Websense\Email Security\p2s_vpn\p2s_vpn_connect.ps1' "
    New Action 2
  16. In the Create Task dialog box, click OK.
    Actions tab
  17. Click the Settings tab, then use the If the task is already running, then the following rule applies drop-down list to select Do not start a new instance and click OK.
  18. In the Task Scheduler dialog box, enter your Password, then click OK.
  19. Open a PowerShell window and type Set-ExecutionPolicy RemoteSigned, then press Enter.
  20. Select the task that was just created and click Run.
    Task Scheduler run

The script will automatically run on startup.

Keywords: Automatic VPN connection script; TRITON AP-DATA Email Gateway; Azure ESG connection script; p2s_vpn_connect.ps1; Azure VPN Connectivity; 

Article Feedback

Thank you for the feedback and comments.