Hello,
im not able to receive md5 hash on big files (1.5GB) via scriptblock.
$blok = {
function get-hash
{
$md5 = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
return $hash = [System.BitConverter]::ToString($md5.ComputeHash([System.IO.File]::ReadAllBytes($_.fullname)))
}
get-childitem f:\data_protector_7_0 -Recurse -force |?{!$_.Psiscontainer}| select fullname ,@{n="Hash";e={$_ |get-hash}}
}
I receive only Fullname, hash property is empty
FullName : F:\data_protector_7_0\ESD_HP_DP_7.00_for_Windows_TD586-15003.01.zip
Hash :
When I run the code locally on server, it works fine
The code itself is working remotely, I can receive hash keys on other files with no problem
G:\log\110829081433share69974.txt 46-1D-E2-6F-28-E5-F1-BC-F3-96-11-5F-7B-EC-A6-B9
G:\log\110829081433vysledekGroup69974.csv C5-A8-E8-50-5A-72-88-98-97-43-B7-F2-E8-77-3A-71
Only have issue with these big files. Its like getting OutOfMemory exception without any error.
Same issue occur, when I run the code via enter-pssession ... still not working on these big files.
I need to check validity on some ZIP files.
Server1: (good)
Name : ESD_HP_DP_7.00_for_Windows_TD586-15003.01.zip
Length : 1692480938
00-38-7B-7C-9D-A1-2C-43-5F-AB-31-6E-1A-9C-5D-8B
Server2 (bad)
Name : ESD_HP_DP_7.00_for_Windows_TD586-15003.01.zip
Length : 1692480938
96-9B-B3-37-3F-59-D2-49-19-D8-CB-25-97-D1-1E-80
-
Edited by
Mekac
Monday, February 16, 2015 11:00 AM