Listes et fichiers texte
Compare-Object (Get-Content .\lundi.txt) (Get-Content .\mardi.txt)
Dossiers
$a = Get-ChildItem C:\Users\Léa\Documents -Recurse -File
$b = Get-ChildItem E:\Sauvegarde\Documents -Recurse -File
Compare-Object $a $b -Property Name, Length
Par contenu
$ha = $a | Get-FileHash; $hb = $b | Get-FileHash
Compare-Object $ha $hb -Property Hash -PassThru | Select-Object Path, SideIndicatorComparer deux fichiers en cmd : fc. Synchroniser : robocopy /MIR.