Jan 10 2022 11:37 AM
Microsoft support assisted me with getting this script setup so that I could get a bug fixed (which they are now saying is by design) that is preventing files from being moved. For some reason, which Microsoft is saying is caused by Adobe Acrobat )even though we don't own that product nor do we have checkouts enabled in SharePoint), causes pdf files to show as checked out but is not listed in the library setting to list files without checked in version. Therefore, we cannot fix them.
I need to move most of our existing libraires and because we have many pdfs, at least each subfolder won't move because it thinks the file is checked out. The only way to move it, is to go into the subfolder (which could actually be 4-5 subfolders deep, cancel the checkout then manually move the single pdf. Depending on how many files, in how many subfolders, this can take HOURS.
I contacted Microsoft and they were able to provide me with a powershell command that would take any file checked out and check it in so that I wouldn't run into this issue the next time I had to move one of our libraries/sites.
I tried to run it today, however, this library has more than 5,000 items so it won't work anymore. I asked Microsoft and now they're saying they don't support powershell and that I should have thought about the 5,000 item threshold before I allowed them to go over. Very helpful.
I will share this great working PS command, however, I need some guidance on how it can be changed to do the checks/updates in batches of under 5,000 files so the limit isn't hit. The one workaround for this is if you use MFA like we do, you have to setup an app password as it won't work for MFA.
The script also requires you to install Sharepoint Software Developer Kit (SDK).
Jan 10 2022 11:37 AM