Deploying agents via GPO#
Prerequisites#
Here are the prerequisites that will permit deployment of GLPI agents with a GPO:
-
Create a shared folder on the network, accessible to all PCs, in which the GLPI agent executables (32bits and/or 64bits) will be placed. These are available on Github: GLPI Agent releases
-
You have to download the glpi-agent-deployment.vbs VBS script which ease deployment via GPO.
Script VBS#
The latest script VBS version can directly be downloaded from the following link: glpi-agent-deployment.vbs
Before using this script in a GPO, you have to edit the few configuration lines at the beginning of the script.
In this file, the following lines then need to be adapted:
-
Line 67: GLPI Agent version to be installed. It has to be update in the case agent version is changing.
-
Line 91: Indicates the path to the shared folder containing the agent MSI packages: For example:
-
Line 112 : Agent installation options Example for GLPI 10 with native inventory support:
Here is a list of common attributes:
- RUNNOW : Launch an inventory just after installation
- ADD_FIREWALL_EXCEPTION : Adds the GLPI agent to the Windows firewall exception list.
- SERVER : agent contact address on the GLPI server
- TAG: Adds the "TAG" tag to agents.
- TASKS: Allows you to manage the order of tasks to be carried out by the agent.
The full list of options is available here: Windows installer command line parameters
The rest of the script does not need to be modified.
Creating the GPO#
The GPO to be created must have the following parameters:
- Type Computer
- Startup script (where we will give the path to the vbs script mentioned above)
Full documentation is also available at this address :
Options#
Add authentication with user and password.#
This option must be requested via the cloud support form if you are a GLPI Network Cloud customer. Once this has been set up on the server side, you will be provided with a user and password. Then you'll be able to use them in agents configuration.
Then you'll have to add USER=
and PASSWORD=
options to options line like in the following example:
SetupOptions = "/quiet RUNNOW=1 ADD_FIREWALL_EXCEPTION=1 SERVER='http://glpi.yourcompany.com/marketplace/glpiinventory/' TAG=MONTAG TASKS=inventory,deploy,collect,inventory USER=MONUSER PASSWORD=MONPASS"
Reference#
- Public GLPI Agent documentation: https://glpi-agent.readthedocs.io/en/latest/index.html