You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2024-02-14 14:52:03

RoseT
Member
Registered: 2024-02-14
Posts: 2

glpi agent GPO script deployment

I deployed glpi agent with this powershell script, and I would like to enable the Netscan and NetDiscovery support option on the agent when it installs.
I have already tried to add things in the $setupOptions but each time the only way to activate this option was manually by going to the installed applications and using the modify option

$url = "https://nightly.glpi-project.org/glpi-agent/GLPI-Agent-1.8-gitea453479-x64. msi"
$output = "$env:TEMP\GLPI-Agent-1.8-gitea453479-x64. msi"

# Check if Fusion Inventory is installed
$fusionInventoryPath = "C:\Program Files\FusionInventory-Agent\Uninstall. exe"
if (Test-Path $fusionInventoryPath) {
    Write-Host "Fusion Inventory is installed. Uninstalling..."
    Start-Process -FilePath $fusionInventoryPath -ArgumentList "/S" -Wait -NoNewWindow
}

Invoke-WebRequest -Uri $url -OutFile $output

$installer = "msiexec. exe"

$setupOptions = "/quiet RUNNOW=1 SERVER='http://x.x.x. x/,http://x.x.x. x/marketplace/glpiinventory/'"

$installerArgs = "/qn /i $output $setupOptions"

Start-Process -FilePath $installer -ArgumentList $installerArgs -Wait -NoNewWindow

thx for help

Last edited by RoseT (2024-02-14 14:55:35)

Offline

Board footer

Powered by FluxBB