Open JazBInKC opened 2 years ago
Follow-up:
This seems to be tied to \\?\
long path support in PowerShell 7. In the example (pulled from my code) I attempt to Set-ACL. The first time with the long path prefix - takes 3 minutes. The second, without the prefix, happens instantly. As most users will be running "legacy" scripts - many supporting long path / max_path PowerShell should consistently support the prefix.
I should mention that the delay only seems to affect folder ACL, not files - go figure.
Regards,
jbw
Prerequisites
Steps to reproduce
Moving a few million files and folders from SharePoint to NTFS. The code works perfectly under PS 5.1, but other (PnP) commands only worked or worked better under PowerShell 7. While running the script I noticed pauses in the script execution. I thought it was O365 throttling, turns out whenever I created a new folder and then set ownership via Set-ACL (note comments before and after Set-ACL), the process would hang for approx. 3 minutes then move on without error. Generally, the folder ownership was never updated. Again this code works flawlessly under PS 5.1. 20 new folders is one hours of wait time.
Expected behavior
Actual behavior
Error details
Environment data
Visuals
there will be no error - it will time out and the script will continue.