{"id":1021,"date":"2014-10-07T07:09:36","date_gmt":"2014-10-07T07:09:36","guid":{"rendered":"https:\/\/poiseddevelopers.com\/reality-tech\/?p=1021"},"modified":"2024-04-26T12:33:59","modified_gmt":"2024-04-26T12:33:59","slug":"filtering-out-lists-that-are-not-sharepoint-libraries","status":"publish","type":"post","link":"https:\/\/poiseddevelopers.com\/reality-tech\/filtering-out-lists-that-are-not-sharepoint-libraries\/","title":{"rendered":"Filtering out lists that are not SharePoint libraries"},"content":{"rendered":"<p>The best way to filter out SharePoint lists when iterating the collection of lists is by Template ID. \u00a0However it\u2019s not that easy to get the template ID. \u00a0Interestingly, GUIDs are somewhat less than random when generated by Microsoft for their internal products. For example, the Feature ID GUID\u2019s last 3 digits is actually the Template ID:<\/p>\n<pre lang=\"php\">\r\n$GUID = $list.TemplateFeatureId.ToString()\r\n$TemplateID = $GUID.substring($guid.length-3)\r\nif ($TemplateID -ne \"101\")\r\n{\r\nwrite-host \"skipping non-DocLib List $($list.title)\"\r\ncontinue;\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The best way to filter out SharePoint lists when iterating the collection of lists is by Template ID. \u00a0However it\u2019s not that easy to get the template ID. \u00a0Interestingly, GUIDs are somewhat less than random when generated by Microsoft for their internal products. For example, the Feature ID GUID\u2019s last 3 digits is actually the [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":1024,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[26],"tags":[],"class_list":["post-1021","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\/1021","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\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/comments?post=1021"}],"version-history":[{"count":3,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1021\/revisions"}],"predecessor-version":[{"id":1028,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1021\/revisions\/1028"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media\/1024"}],"wp:attachment":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media?parent=1021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/categories?post=1021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/tags?post=1021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}