Created
October 2, 2025 11:45
-
-
Save kevcha/92a4765ecec413f62bd5de6c53218fc0 to your computer and use it in GitHub Desktop.
Setup Window Logistique
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # setup.ps1 | |
| # --- Pré-requis : exécuter en Admin --- | |
| # 0) Rendre l'exécution de ce script possible pour cette session | |
| Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force | |
| # 1) Vérifier winget | |
| if (-not (Get-Command winget -ErrorAction SilentlyContinue)) { | |
| Write-Error "winget n'est pas disponible. Installe 'App Installer' depuis le Microsoft Store puis relance ce script." | |
| exit 1 | |
| } | |
| # 2) Installer Google Chrome et Slack via winget | |
| # (flags pour ne pas avoir d'invite et installer en silencieux) | |
| $wingetFlags = @("--accept-package-agreements","--accept-source-agreements","--silent","-e") | |
| # Google Chrome (msi entreprise) | |
| winget install --id Google.Chrome @wingetFlags | |
| # Slack Desktop | |
| winget install --id SlackTechnologies.Slack @wingetFlags | |
| # 3) Forcer l'installation de l'extension Bitwarden dans Chrome | |
| # (nécessite Chrome Enterprise/Policies côté machine ; appliqué au prochain lancement de Chrome) | |
| $chromePolicyRoot = "HKLM:\SOFTWARE\Policies\Google\Chrome" | |
| $extListKey = Join-Path $chromePolicyRoot "ExtensionInstallForcelist" | |
| New-Item -Path $extListKey -Force | Out-Null | |
| # ID extension Bitwarden pour Chrome + URL de mise à jour du Web Store | |
| $bitwardenId = "nngceckbapebfimnlniiiahkandclblb" | |
| $webstoreUpdateUrl = "https://clients2.google.com/service/update2/crx" | |
| # Ajouter à la Forcelist (valeur chaîne "1" = "<id>;<updateURL>") | |
| New-ItemProperty -Path $extListKey -Name "1" -Value "$bitwardenId;$webstoreUpdateUrl" -PropertyType String -Force | Out-Null | |
| # (Optionnel) Désactiver le gestionnaire de mots de passe natif de Chrome | |
| #New-Item -Path $chromePolicyRoot -Force | Out-Null | |
| #New-ItemProperty -Path $chromePolicyRoot -Name "PasswordManagerEnabled" -Value 0 -PropertyType DWord -Force | Out-Null | |
| Write-Host "Politique Bitwarden appliquée. L'extension sera installée/activée au prochain lancement de Chrome." | |
| # 4) Installer QZ Tray en silencieux | |
| # Méthode officielle 'quick install' pour Windows (télécharge la dernière version stable et installe silencieusement) | |
| # NB : si c'est la première fois que tu exécutes un script distant, décommente la ligne Set-ExecutionPolicy juste dessous. | |
| #Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force | |
| irm pwsh.sh | iex | |
| Write-Host "Installation terminée. Tu peux redémarrer la session Windows si nécessaire." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment