The code for s2.ps1 is: $filePath = 'C:\Users\Jim Martinson\Documents\CST1861\Week' get-childitem -path $filepath | get-filehash | Sort-Object hash | Select-Object -first 10