This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatique:windows:cmd [2020/04/27 11:52] – yahiko | informatique:windows:cmd [2024/10/09 10:14] (current) – yahiko | ||
---|---|---|---|
Line 9: | Line 9: | ||
ping -k 192.168.1.1 fr.wikipedia.org | ping -k 192.168.1.1 fr.wikipedia.org | ||
</ | </ | ||
+ | |||
+ | ==== Ping via une interface spécifique ==== | ||
+ | <codedoc code: | ||
+ | ping IP_A_JOINDRE -S ADDR_INTERFACE_SOURCE | ||
+ | </ | ||
+ | Par exemple : | ||
+ | <codedoc code: | ||
+ | ping fr.wikipedia.org -S 192.168.1.86 | ||
+ | </ | ||
+ | |||
+ | ==== Reset couche IP et winsock ==== | ||
+ | <codedoc code: | ||
+ | netsh int ip reset | ||
+ | netsh winsock reset | ||
+ | </ | ||
+ | |||
+ | ==== Mettre en veille Windows ==== | ||
+ | Verrouiller : | ||
+ | <codedoc code: | ||
+ | Rundll32.exe User32.dll, | ||
+ | </ | ||
+ | |||
+ | Veille prolongée : | ||
+ | <codedoc code: | ||
+ | Rundll32.exe User32.dll, | ||
+ | </ | ||
+ | |||
+ | Veille simple : | ||
+ | Il faut la veille prolongée soit désactivée : | ||
+ | <codedoc code: | ||
+ | powercfg -hibernate off | ||
+ | </ | ||
+ | |||
+ | <codedoc code: | ||
+ | rundll32.exe powrprof.dll, | ||
+ | </ | ||
+ | |||
+ | ==== Activation Windows 2022 ==== | ||
+ | <codedoc code: | ||
+ | DISM /Online / | ||
+ | </ | ||
+ | https:// | ||
+ | |||
+ | ==== Connaître le mode de démarrage de Windows ==== | ||
+ | Pour savoir s'il est en sans échec, ou en démarrage normal. Pas toujours évident en télémaintenance. | ||
+ | <codedoc code: | ||
+ | wmic COMPUTERSYSTEM GET BootupState | ||
+ | </ | ||
+ | ou | ||
+ | <codedoc code: | ||
+ | gwmi win32_computersystem | select BootupState | ||
+ | </ | ||
+ | |||
+ | Doit retourner : | ||
+ | <codedoc code: | ||
+ | Normal boot | ||
+ | Fail-safe boot | ||
+ | Fail-safe with network boot | ||
+ | </ | ||
+ | https:// | ||
+ | |||
+ | ==== Connaître chemin LDAP ==== | ||
+ | <codedoc code: | ||
+ | dsquery user -name UTILISATEUR | ||
+ | </ | ||
+ | |||
+ | ==== 7zip : extraire un fichier spécifique de plusieurs archives ==== | ||
+ | <codedoc code: | ||
+ | 7z e " | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Vérifier MD5 ==== | ||
+ | <code batch> | ||
+ | certutil -hashfile < | ||
+ | </ | ||
+ | |||
+ | ==== Suppression récursive d'un dossier ==== | ||
+ | <code batch> | ||
+ | rmdir " | ||
+ | </ | ||
+ | Ajouter /Q pour le faire silencieusement. On peut par exemple faire : | ||
+ | <code batch> | ||
+ | runas / | ||
+ | rmdir " | ||
+ | </ | ||
+ | |||
+ | La technique de Robocopier (oui c'est un verbe) un dossier vide fonctionne bien aussi : | ||
+ | |||
+ | <code batch> | ||
+ | ROBOCOPY " | ||
+ | </ |