# Description # Output all available Content Type GUIDs to output.txt # # Syntax # ./listCntTypID # # Parameters # none # # Settings # Only change the -value parameter! # set-variable -option constant -name url -value "http://devinnergy" # Site collection set-variable -option constant -name out -value "ContentType.csv" # Site collection # End of settings $site = new-object Microsoft.SharePoint.SPSite($url) $web = $site.rootweb.ContentTypes echo "Processing..." ForEach ($id in $web) { '"' + $id.Name + ` '","' + $id.Id + ` '","' + $id.Description + ` '","' + $id.Group + ` '","' + $id.ParentList + ` '"' | Out-File $out -append } $site.Dispose() echo "Finished!" # Changelog # # v1.0 - August 25th, 2008 # First release