Indlela yokuthola i-hash (checksum) yefayela ku-Windows PowerShell

I-hash noma i-checksum yefayili iyinani eliyingqayizivele eliyingqayizivele elibalwe kusuka kokuqukethwe kwefayela futhi ngokuvamile lisetshenziselwa ukuhlola ubuqotho nokuvumelana (imifino) yamafayela ngesikhathi sokulanda, ikakhulukazi uma kuziwa kumafayela amakhulu (amasistimu wesistimu nokunye okunjalo) okungalandwa ngamaphutha noma kukhona izinsolo ukuthi leli fayela lishintshwe yi-malware.

Izingosi zokulanda zivame ukuqukatha i-checksum ibalwa nge-MD5, SHA256 nakwezinye izilungiswa, okukuvumela ukuthi uqinisekise ifayela elilandiwe nefayela elilayishwe unjiniyela. Izinhlelo zesithathu zingasetshenziswa ukubala amasheke amafayela, kodwa kunendlela yokwenza lokhu usebenzisa amathuluzi ejwayelekile we-Windows 10, 8 ne-Windows 7 (adinga amandla we-PowerShell 4.0 noma ngaphezulu) - usebenzisa i-PowerShell noma umugqa womyalo, ozoboniswa emiyalweni.

Ukuthola i-checksum yefayela usebenzisa iWindows

Okokuqala udinga ukuqala iWindows PowerShell: indlela elula ukusebenzisa ukusesha kubha yomsebenzi we-Windows 10 noma imenyu ye-Windows 7 Qala yalokhu.

Umyalo wokubala i-hah yefayela ku-PowerShell - Thola-filehash, futhi ukuyisebenzisa ukubala i-checksum, kwanele ukuyifaka ngemingcele elandelayo (kusibonelo, i-hash ibalwa ngesithombe se-ISO se-Windows 10 kusuka kufolda ye-VM ku-drive C):

Thola ifayelaHash C:  VM  Win10_1607_Russian_x64.iso | Uhlu lokufometha

Uma usebenzisa umyalo kuleli fomu, i-hash ibalwa ngokusebenzisa i-algorithm ye-SHA256, kodwa ezinye izinketho zisekelwa, ezingasethwa ngokusebenzisa i-parameter ye-algorithm, isibonelo, ukubala i-checksum ye-MD5, umyalo uzobukeka esibonelweni esingezansi

Thola ifayelaHash C:  VM  Win10_1607_Russian_x64.iso -Algorithm MD5 | Uhlu lokufometha

Amagugu alandelayo asekelwa ama-algorithms wokuhlola we-checksum ku-Windows PowerShell

  • I-SHA256 (okuzenzakalelayo)
  • MD5
  • SHA1
  • SHA384
  • SHA512
  • MACTripleDES
  • RIPEMD160

Incazelo eningiliziwe ye-syntax yomyalo we-Get-FileHash nayo iyatholakala kwi-website esemthethweni //technet.microsoft.com/en-us/library/dn520872(v=wps.650).aspx

Ukuthola ifayile yefayela kulayini lomyalo nge-CertUtil

Ku-Windows, kunesidingo esakhelwe ngaphakathi ku-CertUtil sokusebenza izitifiketi, okungukuthi, phakathi kwezinye izinto, kungabala i-checksum yamafayela usebenzisa izilungiswa:

  • MD2, MD4, MD5
  • SHA1, SHA256, SHA384, SHA512

Ukuze usebenzise isevisi, vele ugijime umugqa we-Windows 10, 8 noma Windows 7 bese ufaka umyalo kwifomethi elandelayo:

i-certutil -hashfile path_to_file i-algorithm

Isibonelo sokuthola i-hashi ye-MD5 yefayili iboniswa kusikrini esingaphansi.

Okungeziwe: uma kwenzeka udinga izinhlelo zenkampani yangaphandle yokubala amafayela wesistimu e-Windows, ungakhohlwa i-SlavaSoft HashCalc.

Uma ufuna ukubala i-checksum ku-Windows XP noma ku-Windows 7 ngaphandle kwe-PowerShell 4 (futhi ikhono lokuyifaka), ungasebenzisa Umbuso we-Microsoft File Checksum Integrity Verifier umzila womyalo otholakala ukulanda ku-website esemthethweni //www.microsoft.com/en -us / download / details.aspx? id = 11533 (ifomethi yomyalo wokusebenzisa isevisi: fciv.exe ifayela_path - Umphumela uzoba MD5. Ungakwazi futhi ukubala i-Hasha ye-SHA1: fciv.exe -sha1 indlela_to_file)