SharePoint Online MD5 Checksum

Brass Contributor

I've written a PnP-PowerShell script to migrate network file shares and local drives to SharePoint Online, the script is absolutely gorgeous, it preserves metadata, maps users, creates and fill out Document Sets and etc.

 

The only things I've struggled and gave up after failing so many times is the MD5 checksum for the uploaded files on SharePoint Online, in the old days for classic SP you could easily achieve but with the limited ability in the PnP cmdlets I can't get this done, maybe it is my lack of experience and not the other way around but the documentation for PnP isn't the best and there are no many examples out there to help.

 

I'm hoping somebody has figured this out and has some working example of performing the MD5 checksum, any suggestions or ideas are warmly welcomed!

14 Replies

@Alex Gonsales Did you get solution for this..?

@Alex Gonsales  Once the files are moved to SP Online the metadata changes, the chksum also fails, not sure if its becaues of metadata change the reason, however its is observed that, PDF files metadata is not changed they are digitally secured files.

You may need to download the files from SP Online and then do a chksum comparison. some files(PDF /zips) are digitally locked and the chksum will match but not Excel /word etc. etc..

This is default behavior for office files uploaded/moved to SharePoint. You can disable the setting at library level and then checksum is validated. List property (ParserDisabled) can be updated using PowerShell. Set it to True.

$List=$Ctx.Web.Lists.GetByTitle($ListName)
$Ctx.Load($List)
$Ctx.ExecuteQuery()

Write-host "Parser Disabled value " $List.ParserDisabled

$List.ParserDisabled = $true
$List.Update()
$ctx.ExecuteQuery()
Can this also be used for SharePoint Online or does it only apply to on-premise?

@Paul_HK_de_Jong Yes, it works on SPO also.

Hello all,

bear with me as I am only a SharePoint user and not an administrator.

We are having major issues with SharePoint resizing all office files once they are uploaded. Do I understand this thread correctly to mean that this behavior can be disabled in SharePoint?

If so, how can I disable this?

@DavidG4P Yes, I think so. File size changes only when additional details get added/associated with it. Please try it on a test library to observe the behaviour.

@skumar9342 

Sorry for the late reply!

Somehow I was not notified about your answer.

Do you mean that I have to disable this behavior by using the above-mentioned script?

If so, do you happen to have any information how to apply that script? Do I have to be SharePoint administrator to do that?

You should be good with Site Collection Administrator as this is a site level activity.

@skumar93421

Thank you! Would you happen to have a link to some instructions on how this is done? I fear that our IT dept. will have no idea how to do it otherwise.

Thanks very much! So as I understand, this will prevent Office and MSG files from being altered ("enlarged") after upload, but "enlarged" files that already exist in SharePoint will remain there with their "wrong" file size, correct?
Yes.
Thanks very much for your help, much appreciated.