Ordres per instal·lar Puppet Agent sense preguntes, desinstal·lar-lo i detectar-lo des d’eines de desplegament. Només es mostra una ordre quan és segura: la que indica el manifest o el valor per defecte documentat de la tecnologia de l’instal·lador.
Guia relacionada: Instal·lació silenciosa: MSI, NSIS, Inno Setup · Desinstal·lar un programa amb el registre o PowerShell
Amb winget
PowerShell
winget install --id Puppet.puppet-agent -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Puppet.puppet-agent -e --silentwinget uninstall --id Puppet.puppet-agent -e --silentPer instal·lador
64 bits · MSI · Tots els usuaris · en-US
Instal·lació silenciosa
msiexec /i puppet-agent-8.10.0-x64.msi /qn /norestartDesar un registre
msiexec /i puppet-agent-8.10.0-x64.msi /qn /norestart /l*v "%TEMP%\puppet-agent-install.log"Desinstal·lar
msiexec /x {E8DAC06D-885F-4175-A38F-1266CFE64AE4} /qn /norestart- Codi de producte MSI
- {E8DAC06D-885F-4175-A38F-1266CFE64AE4}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E8DAC06D-885F-4175-A38F-1266CFE64AE4}
- UpgradeCode
- {2AD3D11C-61B3-4710-B106-B4FDEC5FA358}
32 bits · MSI · Tots els usuaris · en-US
Instal·lació silenciosa
msiexec /i puppet-agent-8.10.0-x86.msi /qn /norestartDesar un registre
msiexec /i puppet-agent-8.10.0-x86.msi /qn /norestart /l*v "%TEMP%\puppet-agent-install.log"Desinstal·lar
msiexec /x {920FEB48-B20A-4D4D-9AC9-EAEA898949B4} /qn /norestart- Codi de producte MSI
- {920FEB48-B20A-4D4D-9AC9-EAEA898949B4}
- Clau de desinstal·lació al registre
- HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{920FEB48-B20A-4D4D-9AC9-EAEA898949B4}
- UpgradeCode
- {2AD3D11C-61B3-4710-B106-B4FDEC5FA358}
PowerShell: baixar, verificar, instal·lar
Baixa el fitxer oficial, en comprova l’SHA256 i l’instal·la en mode silenciós.
install-puppet-agent.ps1
$url = 'https://downloads.puppetlabs.com/windows/puppet8/puppet-agent-8.10.0-x64.msi'
$sha256 = 'F47C4EC0DDEF7DFF097FD77E7C74610297BA4233BE7E9EE6A366C106F6437459'
$file = Join-Path $env:TEMP 'puppet-agent-8.10.0-x64.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait install-puppet-agent.ps1
$url = 'https://downloads.puppetlabs.com/windows/puppet8/puppet-agent-8.10.0-x86.msi'
$sha256 = '8E1C7501D90FFDFFA9A4E5E9DB29986C08AC0B08F2DBD6C2292D0ACAB9974EFF'
$file = Join-Path $env:TEMP 'puppet-agent-8.10.0-x86.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait