Site Tools


informatique:windows:cmd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
informatique:windows:cmd [2022/11/24 14:51] – [Mettre en veille Windows] yahikoinformatique:windows:cmd [2024/10/09 10:14] (current) yahiko
Line 46: Line 46:
 </codedoc> </codedoc>
  
-https://sites.google.com/site/xiangyangsite/home/technical-tips/windows-tips/how-to-suspend-hibernate-windows-7-from-command-line+==== Activation Windows 2022 ==== 
 +<codedoc code:batch> 
 +DISM /Online /Set-Edition:ServerStandard /ProductKey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /AcceptEula 
 +</codedoc> 
 +https://learn.microsoft.com/en-us/answers/questions/717383/windows-server-2022-standard-activation.html 
 + 
 +==== 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:batch> 
 +wmic COMPUTERSYSTEM GET BootupState 
 +</codedoc> 
 +ou 
 +<codedoc code:powershell> 
 +gwmi win32_computersystem | select BootupState 
 +</codedoc> 
 + 
 +Doit retourner : 
 +<codedoc code:batch>  
 +Normal boot 
 +Fail-safe boot 
 +Fail-safe with network boot 
 +</codedoc> 
 +https://wiki.erreur503.xyz/doku.php?id=informatique:windows:cmd 
 + 
 +==== Connaître chemin LDAP ==== 
 +<codedoc code:batch>  
 +dsquery user -name UTILISATEUR 
 +</codedoc> 
 + 
 +==== 7zip : extraire un fichier spécifique de plusieurs archives ==== 
 +<codedoc code:batch>  
 +7z e "C:\Logs\OldLogs\*.zip" -oC:\Informatique\logs Truc* -
 +</codedoc> 
 + 
 + 
 +==== Vérifier MD5 ==== 
 +<code batch> 
 +certutil -hashfile <file> MD5 
 +</code> 
 + 
 +==== Suppression récursive d'un dossier ==== 
 +<code batch> 
 +rmdir "Dossier trucbidule" /S 
 +</code> 
 +Ajouter /Q pour le faire silencieusement. On peut par exemple faire :  
 +<code batch> 
 +runas /user:administrateur cmd 
 +rmdir "C:\user\machin\truc bidule" /S /Q 
 +</code> 
 + 
 +La technique de Robocopier (oui c'est un verbe) un dossier vide fonctionne bien aussi :  
 + 
 +<code batch> 
 +ROBOCOPY "C:\dossier_vide" C:\user\machin\truc a effacer" /MIR 
 +</code>
informatique/windows/cmd.1669301469.txt.gz · Last modified: 2022/11/24 14:51 by yahiko