{"id":1972,"date":"2011-12-14T06:16:27","date_gmt":"2011-12-14T06:16:27","guid":{"rendered":"https:\/\/poiseddevelopers.com\/reality-tech\/?p=1972"},"modified":"2024-04-26T12:06:30","modified_gmt":"2024-04-26T12:06:30","slug":"removing-metadata-from-folders","status":"publish","type":"post","link":"https:\/\/poiseddevelopers.com\/reality-tech\/removing-metadata-from-folders\/","title":{"rendered":"Removing metadata from Folders"},"content":{"rendered":"<p>A dear friend of mine inadvertently tagged his SharePoint Document Library folders while using a combination of Default Metadata and Explorer mode.\u00a0 Could SharePoint Manager solve this? Nope, much of SharePoint Manager (a quite nice utility) is read-only.\u00a0 PowerShell to the rescue!<\/p>\n<pre lang=\"php\">\r\n$web = get-spweb \"<a_href=\"ht tp:\/\/yourweburl\/\">ht tp:\/\/YourWebURL\"\r\n$list1 = $web.Lists[\"YourLibraryTitle\"]\r\n$list1.Folders | ForEach-Object `\r\n{ $_.properties[\"YourFieldName\"]=\"\"\r\n  $_.update()\r\n}\r\n$list1.update()\r\n$web.update()\r\n<\/pre>\n<p>To understand the code, one needs to recognize that Folders are stored separate from files; usually an annoyance, but in this case where we are only interested in Folders, it works great.  Note the three separate update() methods.  All three are indeed required.<\/p>\n<p>Of course this can be extended into a function, and it could process all libraries, in all webs, etc\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A dear friend of mine inadvertently tagged his SharePoint Document Library folders while using a combination of Default Metadata and Explorer mode.\u00a0 Could SharePoint Manager solve this? Nope, much of SharePoint Manager (a quite nice utility) is read-only.\u00a0 PowerShell to the rescue! $web = get-spweb &#8220;ht tp:\/\/YourWebURL&#8221; $list1 = $web.Lists[&#8220;YourLibraryTitle&#8221;] $list1.Folders | ForEach-Object ` { [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":1975,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[26],"tags":[],"class_list":["post-1972","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"_links":{"self":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1972","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/comments?post=1972"}],"version-history":[{"count":1,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1972\/revisions"}],"predecessor-version":[{"id":1979,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1972\/revisions\/1979"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media\/1975"}],"wp:attachment":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media?parent=1972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/categories?post=1972"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/tags?post=1972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}