{"id":447,"date":"2013-03-31T10:00:10","date_gmt":"2013-03-31T10:00:10","guid":{"rendered":"https:\/\/poiseddevelopers.com\/reality-tech\/?p=447"},"modified":"2024-04-26T13:07:02","modified_gmt":"2024-04-26T13:07:02","slug":"view-all-crawled-properties-for-a-given-sharepoint-document","status":"publish","type":"post","link":"https:\/\/poiseddevelopers.com\/reality-tech\/view-all-crawled-properties-for-a-given-sharepoint-document\/","title":{"rendered":"View all Crawled Properties for a given SharePoint Document"},"content":{"rendered":"<h4>View all Crawled Properties for a SharePoint Document<\/h4>\n<p>I often need to examine all the properties of a document. This is most useful for researching issues relating to the crawl property values<\/p>\n<p>In this little PowerShell function I grab the SPItem, and split the internal XML with line feeds. Here\u2019s the function:<\/p>\n<p>&nbsp;<\/p>\n<pre lang=\"php\">Function Get-CrawledPropertyNames([string]$DocURL){\u00a0\r\n$DocURL = $DocURL.Replace(\"%20\",\" \")\r\n$webfound = $false\r\n$weburl = $DocURL\r\n\u00a0\r\nwhile ($webfound -eq $false) {\r\n\u00a0\u00a0\u00a0\u00a0if ($weburl.Contains(\"\/\")){\r\n\u00a0\u00a0\u00a0\u00a0$weburl = $weburl.Substring(0,$weburl.LastIndexOf(\"\/\"))\r\n\u00a0\u00a0\u00a0\u00a0$web = get-spweb -identity $weburl -ea 0\r\n\u00a0\u00a0\u00a0\u00a0if ($web -ne $null){\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$webfound = $true\r\n\u00a0\u00a0\u00a0\u00a0}\r\n\u00a0\u00a0\u00a0\u00a0}else{\r\n\u00a0\u00a0\u00a0\u00a0Write-Host -ForegroundColor Red \"The Web could not be found\"\r\n\u00a0\u00a0\u00a0\u00a0return -1\r\n\u00a0\u00a0\u00a0\u00a0}\r\n}\r\n$web.GetFile($DocURL).item.xml.Replace(\"' \", \"' n\").Replace(\"\" \", \"`\" `n\")\r\n}\r\n<\/pre>\n<p>#To use, simply replace with the url of a file within a document library, here\u2019s an example:<\/p>\n<pre lang=\"Java\">#Get-CrawledPropertyNames \"http :\/\/SharePoint\/sites\/SPWeb\/Library\/folder\/FileName.DOC\"\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>View all Crawled Properties for a SharePoint Document I often need to examine all the properties of a document. This is most useful for researching issues relating to the crawl property values In this little PowerShell function I grab the SPItem, and split the internal XML with line feeds. Here\u2019s the function: &nbsp; Function Get-CrawledPropertyNames([string]$DocURL){\u00a0 [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":449,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[26],"tags":[],"class_list":["post-447","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\/447","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=447"}],"version-history":[{"count":5,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/447\/revisions"}],"predecessor-version":[{"id":477,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/447\/revisions\/477"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media\/449"}],"wp:attachment":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media?parent=447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/categories?post=447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/tags?post=447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}