Jump to content

Populating a Labtech group from an EXE

Recommended Posts

Hi Guys,

I have a script that installs VPN adaptor for clients using EDF's. It collates the info from the EDF for specified client and pushes out the VPN software(native adaptor) using the info.

The script has an EXE that checks the RAS phonebook to see if the VPN already exists via the name and if so for now it overwrites it.

I would like to create a group whereby it run this CheckIFVPNExists exe in a script against a whole client and if devices in the client has no VPN installed it populates this group with the list of automate device.

I believe I am trying to populate a group using script rather than a search function.


Thanks in Advance

Share this post

Link to post
Share on other sites

I read your post a few times and I'm still not completely sure what you're saying.

1> If the script exists, what tells it to run automatically?

2> All you want to do is get the clients that SHOULD have the VPN but DON'T into a group?

You really should just turn this into a remote monitor instead, and have it trigger a script inside Automate to fix/create the VPN if needed.

Share this post

Link to post
Share on other sites

Thanks for your reply @MGreen

I have a script (VPN Install) that checks is not automated. It is triggered manually on devices by technicians.

  • The function of this script is to check if VPN native adaptor is installed with a specific name eg Work VPN.
  • If the VPN is installed, the script goes on to delete the VPN adaptor on the device and reinstalls the VPN
  • Likewise if the VPN is not installed, the script goes on to create a new VPN adaptor with name Work VPN.

This script works a treat and allows our technicians to remotely deploy & update VPN adaptors for our clients.

However I am trying to make it smarter. The script has an EXE it downloads & runs to check if a VPN adaptor is installed. 

Like I mentioned above if the VPN is not installed it proceeds to install the VPN. I am trying to run this EXE against 80 endpoint periodically so it catches any endpoint without a VPN adaptor and puts this device into a group (VPN Not Installed) where i can action the full script to install VPN on any endpoint(s) in the group.

I think your suggest about a remote monitor might work however i am struggling to see how i can run the exe periodically e.g weekly, to check endpoints and put these endpoints into a group where i can trigger the script inside Automate to install the VPN.

I hope this makes sense?




Share this post

Link to post
Share on other sites

Sorry for the late reply @MGreen

The EXE returns the following results;

IF already installed
Exe_output - Displays VPN name (LOGGED-IN User RAS Phonebook)
Exe_output1 - Displays VPN name (GLOBAL RAS Phonebook)
IF not installed
Exe_output - Displays OK (LOGGED-IN User RAS Phonebook)
Exe_output1 - Displays OK (GLOBAL RAS Phonebook)


Share this post

Link to post
Share on other sites

So use the EXE as a remote monitor and check the output, run the monitor on the frequency you want and then the alert template can be used to run a script that will 1) make a ticket, 2) grab the current time, 3) fix/setup the VPN 4) confirm its valid 5) track the end time 6) post time to the ticket 7) close the ticket automatically. If a failure occurs when scripting the VPN it can keep the ticket open and escalate it to be assigned for manual intervention.

Share this post

Link to post
Share on other sites

@MGreenThanks for your response.

Sorry it took a while to respond back. What you advised worked and I have actioned it, however I made a slight change to make it less persistently painful on the device processors.

1) I created a search function and limited it to the location, laptops and online devices.

2) Created a group under the client and applied the search to populate the devices in group. Devices in group is limited search.

3) Created a script to copy the exe file across to the devices and linked script to the group.

4) Created a remote monitor for the group to run the exe on the device and if it has VPN installed take no action. If VPN is not installed the remote monitor has an alert to install the VPN client using the script. 


Early days but seems to be all working. Important part there was to limit the group to online devices.


Thanks once again.

Share this post

Link to post
Share on other sites

Sounds good, I'm not sure why limiting devices to online only is important, the script will skip offline devices unless you tell it not to and the remote monitor will not execute or alert on offline devices either... but as long as it works :)

  • Like 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...