{"id":1364,"date":"2012-09-04T12:21:26","date_gmt":"2012-09-04T12:21:26","guid":{"rendered":"https:\/\/poiseddevelopers.com\/reality-tech\/?p=1364"},"modified":"2024-05-13T10:50:00","modified_gmt":"2024-05-13T10:50:00","slug":"content-type-summary-report","status":"publish","type":"post","link":"https:\/\/poiseddevelopers.com\/reality-tech\/content-type-summary-report\/","title":{"rendered":"Content Type Summary Report"},"content":{"rendered":"<h2>Content Type Summary Report<\/h2>\n<p>Sometimes I get challenged with questions as to which fields are used in which Content Types.\u00a0 All too often I need to know quickly know the internal name of fields used in Content Types.\u00a0 I wrote a script that generates a report that you can run to generate a CSV that can easily be Pivoted in Excel for answering such questions. I\u2019m a huge fan of using a Content Type Syndication Hub. With all the Content Types in one location, this report becomes very useful.<\/p>\n<div><\/div>\n<pre lang=\"php\"> $rootwebname=\"http :\/\/SharePoint\"\r\n$rootweb=Get-SPWeb $rootwebname\r\n$MyCTSummaryCSV=\"L:CTSummary.CSV\"\r\nAdd-Content  $MyCTSummaryCSV \"CT Name,CT Group,Parent CT, CT Read-Only,CT Hidden,Field Internal Name,Field Title,Field Type,ShowInDisplayForm,ShowInEditForm,ShowInNewForm\"\r\n \r\n$CTs=$rootweb.contenttypes\r\n \r\nfor ($i=0; $i -lt $CTs.count; $i++)\r\n{\r\n    $CT=$CTs[$i];\r\n    $CTName=$CT.Name;\r\n    $Fields=$CT.Fields;\r\n    for ($j=0; $j -lt $Fields.count; $j++)\r\n    {\r\n        $Field=$Fields[$j];\r\n         \r\n        $OutStr=\"$($CTName),$($CT.group),$($CT.Parent.Name),$($CT.ReadOnly),$($CT.Hidden),$($Field.staticname),$($Field.Title),$($Field.type),$($Field.ShowInDisplayForm),$($Field.ShowInEditForm),$($Field.ShowInNewForm)\"\r\n        Write-Host \".\" -NoNewline\r\n        Add-Content  $MyCTSummaryCSV $OutStr\r\n        #write-host \"$($outstr)\"\r\n    }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Content Type Summary Report Sometimes I get challenged with questions as to which fields are used in which Content Types.\u00a0 All too often I need to know quickly know the internal name of fields used in Content Types.\u00a0 I wrote a script that generates a report that you can run to generate a CSV that [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":1368,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[39],"tags":[],"class_list":["post-1364","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-content-types"],"acf":[],"_links":{"self":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1364","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/comments?post=1364"}],"version-history":[{"count":2,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1364\/revisions"}],"predecessor-version":[{"id":3963,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1364\/revisions\/3963"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media\/1368"}],"wp:attachment":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media?parent=1364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/categories?post=1364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/tags?post=1364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}