Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
wiki:bootstrapwindows [14/05/2024 16:10] – 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:// | ||
TL;DR: | TL;DR: | ||
- | Dans un powershell admin (clic droit sur le menu démarrer, puis choisir " | + | Dans un powershell admin (clic droit sur le menu démarrer, puis choisir " |
<code bash> | <code bash> | ||
- | #WIP Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(' | + | Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(' |
</ | </ | ||
Ligne 21: | Ligne 19: | ||
</ | </ | ||
Sur une installation anglaise, c'est " | Sur une installation anglaise, c'est " | ||
- | ==== Accès physique à la machine, shell cygwin admin ==== | + | |
+ | ==== 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:// | ||
+ | </ | ||