Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| wiki:bootstrapwindows [14/05/2024 11:06] – créée vincent.adolphe | wiki:bootstrapwindows [16/12/2025 17:22] (Version actuelle) – vincent.adolphe | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ====== Bootstraper une machine Windows ====== | ====== Bootstraper une machine Windows ====== | ||
| + | ===== Version Automatique (script powershell) ===== | ||
| - | * https://doc.cliss21.com/wiki/BootStrapWindows | + | Dans un powershell admin (clic droit sur le menu démarrer, puis choisir " |
| + | <code bash> | ||
| + | Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(' | ||
| + | </code> | ||
| + | ===== Version manuelle ===== | ||
| + | |||
| + | ==== Accès physique à la machine (écran clavier) ==== | ||
| + | === powershell admin === | ||
| + | * Ajouter la machine a l' | ||
| + | * Nommer la machine | ||
| + | * Créer l' | ||
| + | <code bash> | ||
| + | $PASS = ' | ||
| + | net user root " | ||
| + | net localgroup Administrateurs root /add | ||
| + | </ | ||
| + | Sur une installation anglaise, c'est " | ||
| + | |||
| + | === powershell admin en tant que root === | ||
| + | Se connecter avec ce nouveau compte '' | ||
| + | |||
| + | * régler les éventuels pb d' | ||
| + | * Installer chocolatey (cf https:// | ||
| + | # install chocolatey | ||
| + | Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(' | ||
| + | # install cygwin | ||
| + | choco install -y cygwin cyg-get | ||
| + | # install ssh, python, rsync in cygwin environment | ||
| + | cyg-get.bat openssh python3 rsync | ||
| + | # open firewall for SSH and PING | ||
| + | netsh advfirewall firewall add rule name=" | ||
| + | netsh advfirewall firewall add rule name=" | ||
| + | # Launch a cygwin bash windows | ||
| + | C: | ||
| + | </ | ||
| + | |||
| + | === shell cygwin admin === | ||
| + | configurer ssh: | ||
| + | <code bash> | ||
| + | PASS=' | ||
| + | ssh-host-config --yes --name ' | ||
| + | mkpasswd -l > /etc/passwd | ||
| + | mkgroup -l > /etc/group | ||
| + | cygrunsrv.exe --start sshd | ||
| + | </ | ||
| + | |||
| + | ==== Accès via SSH ==== | ||
| + | Un rôle ansible permettant de pousser les clef ssh publique peut être joué a ce moment. | ||
| + | |||
| + | * installer quelques logiciels libres | ||
| + | <code bash> | ||
| + | choco install -y libreoffice thunderbird firefox vlc | ||
| + | </ | ||
| + | * cacher l' | ||
| + | regtool add ' | ||
| + | regtool add ' | ||
| + | regtool -d set ' | ||
| + | </ | ||
| + | * vérifier:< | ||
| + | regtool -p list ' | ||
| + | regtool get ' | ||
| + | </ | ||
| + | * Pour créer un profil de mise en veille compatible avec la sauvegarde (pas de mise en veille sur secteur):< | ||
| + | powercfg / | ||
| + | # ignorer l' | ||
| + | powercfg /changename 381b4222-f694-41f0-9685-ff5bb260df2f " | ||
| + | powercfg /setactive 381b4222-f694-41f0-9685-ff5bb260df2f | ||
| + | powercfg /change standby-timeout-ac 0 | ||
| + | powercfg /change hibernate-timeout-ac 0 | ||
| + | # desactiver la mise en veille des disques dur: | ||
| + | powercfg / | ||
| + | </ | ||
| + | ==== Installation TightVNC (Facultatif) ==== | ||
| + | |||
| + | === Sur le poste de l' | ||
| + | <code bash> | ||
| + | VNCPASS=" | ||
| + | apt-get install tigervnc-common | ||
| + | PASS=$(echo " | ||
| + | echo ' | ||
| + | </ | ||
| + | |||
| + | === Accès via SSH === | ||
| + | |||
| + | <code bash> | ||
| + | PASS=" | ||
| + | choco install -y tightvnc | ||
| + | regtool | ||
| + | regtool | ||
| + | regtool --binary set ' | ||
| + | net stop tvnserver | ||
| + | net start tvnserver | ||
| + | </ | ||
| + | |||
| + | La GUI de tightvnc s' | ||
| + | |||
| + | ==== Outils divers ==== | ||
| + | |||
| + | === paquets chocolatey === | ||
| + | À installer avec un '' | ||
| + | * thunderbird | ||
| + | * firefox | ||
| + | * libreoffice (-> resoud en libreoffice-fresh et dans la langue definie dans les locales) | ||
| + | * chromium (un chrome en moins curieux des donnees personnelles) | ||
| + | * openvpn-community | ||
| + | * | ||
| + | |||
| + | |||
| + | === Windows10Debloater === | ||
| + | Fonctionne sous windows10 et windows11 | ||
| + | * cf https:// | ||
| + | * source: https:// | ||
| + | * utilisation <code bash> | ||
| + | iwr -useb https:// | ||
| + | </ | ||
| + | |||
| + | === Ajout d'un utilisateur local === | ||
| + | À l' | ||
| + | |||
| + | < | ||
| + | net user USERNAME " | ||
| + | net localgroup Administrateurs USERNAME /add | ||
| + | </ | ||
| + | |||
| + | Version moderne (powershell): | ||
| + | <code ps1> | ||
| + | $SecurePassword = ConvertTo-SecureString " | ||
| + | New-LocalUser -Name " | ||
| + | |||
| + | Add-LocalGroupMember -Group " | ||
| + | </ | ||
| + | |||
| + | Changer le nom d' | ||
| + | <code ps1> | ||
| + | Set-LocalUser -Name " | ||
| + | </ | ||
| + | |||
| + | Renommer un compte (non testé - il y a peut être des effets de bord): | ||
| + | <code ps1> | ||
| + | Rename-LocalUser -Name " | ||
| + | </ | ||