This repo contains 3 scripts and a JSON configuration file that can be connected to Azure, Active Directory and Intune.
- Rights : sudo, Application Administrator for Azure
- GLPI : Those scripts actually work on GLPI 11.0.5
- PowerShell : You will need to install PowerShell on your server if it's a Linux server via :
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.debdpkg -i packages-microsoft-prod.debsudo apt-get update
sudo apt-get install -y powershell# To use PowerShell on the shell
pwshThis file contains the configuration to GLPI Agent for Android.
This file asks to GLPI Agent to retrieve the right Serial Number of the Phone and add it to GLPI.
The configuration allows to GLPI Agent to start an inventory every day.
The content of this file needs to be added into the configuration of your GLPI APP on Intune.
Don't forget to add a group to push the app and the configuration on Android Devices (it can be the same).
This file is "connected" to the previous one.
It compares the phone on GLPI to your phone present in your Intune.
It receives the user on Intune and add it into your GLPI.
Also it modifies the name of the phone on GLPI as modelOfThePhone_de_UserName
This file can be stored wherever you want and can be start with :
pwsh
./Synchro_Intune_GLPI_Android.ps1It creates a backup of your database on your server.
Make sure to configure the destination path and database credentials inside the script before running it.
This file can be stored wherever you want and can be start with :
./Backup_GLPI_DB.shThis script is for Windows endpoint.
This file can be added to an Intune Package, which contains the .msi file of the GLPI Agent and the script.
This script scans the endpoint looking for a previous installation of GLPI Agent.
If there is a previous installation it deletes it, installs the new version with the configuration and create a flag to avoid a useless reinstallation.
If there is no previous installation, it install it with the configuration and create a flag to avoid useless reinstallation.
The script can be modified to be adapted to newer version of GLPI Agent.
On your Application Install command, you can use this command :
powershell.exe -ExecutionPolicy Bypass -NoProfile -File .\setup_glpi_agent_<version>.ps1And this one for Uninstall command :
powershell.exe -ExecutionPolicy Bypass -NoProfile -File .\setup_glpi_agent_1.16.ps1 -UninstallOnlyAll of those script can be used with cron to do an automation.
This project is licensed under the MIT License - see the LICENSE file for details.