SharePoint Online SPOMod: Get-SPOContentType
This article describes a function of a custom SharePoint Online module available for download and installation on GitHub where it welcomes all your suggestions and contributions.
Get-SPOContentType
Retrieves content types.
Parameters
ListTitle | Optional | String. Name of the title where the content types are located. |
Available | Optional | Switch. Whether to pull site content types or AVAILABLE site content types. The difference is discussed here: Web_ContentTypes_vs_Web_AvailableContentTypes |
Examples
----- EXAMPLE 1 ------
Get all content types and their properties
Get-SPOContentType
----- EXAMPLE 2 ------
Get content types - their names and ids
Get-SPOContentType | select name, ID
----- EXAMPLE 3 ------
Get specific content types by its ID
Get-SPOContentType -Available | where {$_.StringID -eq "0x"}
----- EXAMPLE 4 ------
Get content types assigned to a list and their columns/fields.
Get-SPOContentType -ListTitle MyList6 | select name, fieldlinks | fl
----- EXAMPLE 5 ------
Get content types assigned to a list, their properties and export them to CSV.
Get-SPOContentType -ListTitle MyList6 | export-csv c:\toListDel.csv
----- EXAMPLE 6 ------
Get a content type by its name.
Get-SPOContentType -Available | where {$_.Name -eq "Item"}
----- EXAMPLE 7 ------
Get content types and their associated forms.
Get-SPOContentType | select name, *formtemplatename*
See Also
SPOMod Cmdlets and Resources
Connect-SPOCSOM
Get-SPOList
New-SPOSiteContentType
New-SPOListContentType
New-SPOSiteContentTypeColumn
Remove-SPOContentType
Wiki: SharePoint Online content types in Powershell: Add
Wiki: SharePoint Online content types in Powershell: Get
Wiki: SharePoint Online content types in Powershell: Edit
http://c.statcounter.com/10671267/0/d783e2f1/0/