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 [17/05/2024 11:58] (Version actuelle) – vincent.adolphe | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ====== Bootstraper une machine Windows ====== | ====== Bootstraper une machine Windows ====== | ||
| - | * https://doc.cliss21.com/ | + | TL;DR: |
| + | |||
| + | 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(' | ||
| + | </ | ||
| + | |||
| + | ===== 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 > / | ||
| + | mkgroup -l > / | ||
| + | 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 ===== | ||
| + | |||
| + | ==== Windows10Debloater ==== | ||
| + | Fonctionne sous windows10 et windows11 | ||
| + | * cf https:// | ||
| + | * source: https:// | ||
| + | * utilisation <code bash> | ||
| + | iwr -useb https:// | ||
| + | </code> | ||
| + | |||