{"id":3204,"date":"2019-08-30T12:47:54","date_gmt":"2019-08-30T11:47:54","guid":{"rendered":"https:\/\/www.lieben.nu\/liebensraum\/?p=3204"},"modified":"2019-08-30T12:47:54","modified_gmt":"2019-08-30T11:47:54","slug":"max-path-length-in-sharepoint-online-onedrive-for-business-and-teams","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2019\/08\/max-path-length-in-sharepoint-online-onedrive-for-business-and-teams\/","title":{"rendered":"Max Path Length in Sharepoint Online, Onedrive for Business and Teams"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_26_27-Windows-PowerShell-ISE.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1178\" height=\"238\" src=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_26_27-Windows-PowerShell-ISE.png\" alt=\"\" class=\"wp-image-3206\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_26_27-Windows-PowerShell-ISE.png 1178w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_26_27-Windows-PowerShell-ISE-300x61.png 300w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_26_27-Windows-PowerShell-ISE-1024x207.png 1024w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_26_27-Windows-PowerShell-ISE-768x155.png 768w\" sizes=\"auto, (max-width: 1178px) 100vw, 1178px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Many Office 365 clients (and especially Excel) really don&#8217;t like long paths. The older the client, the worse the issues. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To <a rel=\"noreferrer noopener\" aria-label=\"find files over a certain path length in Office 365 (opens in a new tab)\" href=\"https:\/\/www.lieben.nu\/liebensraum\/2018\/10\/finding-files-in-sharepoint-online-or-teams-that-exceed-218-path-length\/\" target=\"_blank\">find files over a certain path length in Office 365<\/a>, I wrote a script a while back. This required manual perusal of the results and manual correction of the issues.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The new version of my script now features fully automatic discovery, a flexible editor and automatic correction of paths based on what you entered into the editor.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_27_21-Lieben-Consultancy.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1608\" height=\"896\" src=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_27_21-Lieben-Consultancy.png\" alt=\"\" class=\"wp-image-3205\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_27_21-Lieben-Consultancy.png 1608w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_27_21-Lieben-Consultancy-300x167.png 300w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_27_21-Lieben-Consultancy-1024x571.png 1024w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_27_21-Lieben-Consultancy-768x428.png 768w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2019\/08\/2019-08-30-13_27_21-Lieben-Consultancy-1536x856.png 1536w\" sizes=\"auto, (max-width: 1608px) 100vw, 1608px\" \/><\/a><figcaption class=\"wp-element-caption\">Correcting path lengths in Sharepoint Online, Onedrive for Business and Microsoft Teams<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can get the PowerShell script \/ editor from my <a href=\"https:\/\/github.com\/jflieben\/assortedFunctionsV2\/blob\/main\/fix-filesWithLongPathsInOffice365.ps1\" target=\"_blank\" rel=\"noreferrer noopener\">git repository here.<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Many thanks to <a rel=\"noreferrer noopener\" aria-label=\"CTS (opens in a new tab)\" href=\"https:\/\/charterts.com\/\" target=\"_blank\">CTS<\/a> in their help me designing and testing this script!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>How to use<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>download the script and save it somewhere<\/li>\n\n\n\n<li>Copy the desired Sharepoint Library into a new Sharepoint Library and\/or site<\/li>\n\n\n\n<li>Run the script only for that site or library by specifying the -specificSiteUrls or specificDocumentLibraries parameter<\/li>\n\n\n\n<li>do some corrections, commit them, check the results<\/li>\n\n\n\n<li>If satisfied, set permissions for your admin account on the actual production locations your wish to fix (<a aria-label=\"script for Onedrive Mass Permissions here (opens in a new tab)\" href=\"https:\/\/www.lieben.nu\/liebensraum\/2015\/08\/setting-administrative-permissions-on-all-your-onedrive-for-business-accounts\/\" target=\"_blank\" rel=\"noreferrer noopener\">script for Onedrive Mass Permissions here<\/a>)<\/li>\n\n\n\n<li>Ensure no users have open files in the library<\/li>\n\n\n\n<li>Remove any non-standard characters from folder names (see script source, example code at the top)<\/li>\n\n\n\n<li>Run<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Disclaimer<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li> Please make sure you TEST this on a copy of your document library\/sites before using the &#8216;commit&#8217; option. <\/li>\n\n\n\n<li> Use at your own risk. <\/li>\n\n\n\n<li>  I recommend<a href=\"https:\/\/www.lieben.nu\/liebensraum\/2016\/06\/do-not-forget-to-enable-the-unified-audit-log\/\"> turning on the Universal Audit log<\/a> before usage.  <\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many Office 365 clients (and especially Excel) really don&#8217;t like long paths. The older the client, the worse the issues. To find files over a certain path length in Office 365, I wrote a script a while back. This required manual perusal of the results and manual correction of the issues. The new version of &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2019\/08\/max-path-length-in-sharepoint-online-onedrive-for-business-and-teams\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Max Path Length in Sharepoint Online, Onedrive for Business and Teams<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[4,27,32,34,39,44],"tags":[],"class_list":["post-3204","post","type-post","status-publish","format-standard","hentry","category-automation","category-microsoft-teams","category-office-365","category-onedrive-for-business","category-powershell","category-sharepoint-online"],"_links":{"self":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/3204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/comments?post=3204"}],"version-history":[{"count":0,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/3204\/revisions"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=3204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=3204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=3204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}