SharePoint Online content types in PowerShell: Group property
Introduction
This article is a helper article for the main compendium on Content Types:
SharePoint Online content types in Powershell: Add
SharePoint Online content types in Powershell: Get
SharePoint Online content types in Powershell: Edit
Content Types and their Default Groups
ContentType
Group
System
_Hidden
Common Indicator Columns
_Hidden
Fixed Value based Status Indicator
Business Intelligence
SharePoint List based Status Indicator
Business Intelligence
Excel based Status Indicator
Business Intelligence
SQL Server Analysis Services based Status Indicator
Business Intelligence
Item
List Content Types
Circulation
Group Work Content Types
New Word
Group Work Content Types
Category
Community Content Types
Site Membership
Community Content Types
Community Member
Community Content Types
WorkflowServiceDefinition
_Hidden
Health Analyzer Rule Definition
_Hidden
Resource
Group Work Content Types
Official Notice
Group Work Content Types
Phone Call Memo
Group Work Content Types
Project Policy
_Hidden
Holiday
Group Work Content Types
What's New Notification
Group Work Content Types
WorkflowServiceSubscription
_Hidden
Timecard
Group Work Content Types
Resource Group
Group Work Content Types
Rule
_Hidden
Health Analyzer Report
_Hidden
Users
Group Work Content Types
Document
Document Content Types
Display Template
_Hidden
Display Template Code
_Hidden
JavaScript Display Template
Display Template Content Types
Report
Business Intelligence
Office Data Connection File
_Hidden
List View Style
Document Content Types
Rich Media Asset
Digital Asset Content Types
Video Rendition
Digital Asset Content Types
Audio
Digital Asset Content Types
Image
Digital Asset Content Types
Web Part Page with Status List
Business Intelligence
Universal Data Connection File
_Hidden
Design File
_Hidden
InfoPath Form Template
_Hidden
Form
Document Content Types
Picture
Document Content Types
Unknown Document Type
Special Content Types
Master Page
Document Content Types
Master Page Preview
Document Content Types
User Workflow Document
_Hidden
Wiki Page
Document Content Types
Basic Page
Document Content Types
Web Part Page
Document Content Types
Link to a Document
Document Content Types
Dublin Core Columns
Document Content Types
Event
List Content Types
Reservations
List Content Types
Schedule and Reservations
List Content Types
Schedule
List Content Types
Issue
List Content Types
Announcement
List Content Types
Link
List Content Types
Contact
List Content Types
Message
List Content Types
Task
List Content Types
Workflow Task (SharePoint 2013)
List Content Types
Workflow Task
_Hidden
SharePoint Server Workflow Task
_Hidden
Administrative Task
_Hidden
Workflow History
_Hidden
Person
_Hidden
SharePointGroup
_Hidden
DomainGroup
_Hidden
Post
List Content Types
Comment
List Content Types
East Asia Contact
List Content Types
Folder
Folder Content Types
RootOfList
_Hidden
Discussion
Folder Content Types
Summary Task
Folder Content Types
Document Collection Folder
_Hidden
Document Set
Document Set Content Types
System Media Collection
_Hidden
Video
Digital Asset Content Types
Script
The above-mentioned content types and groups were retrieved from a newly created tenant from the Content Type Hub before any customizations or features were added, using the script below. Feel free to modify it or improve for your needs.
function Set-SPOContentType
{
param (
[Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
$AdminPassword,
[Parameter(Mandatory=$true,Position=3)]
[string]$Url
)
$ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
$ctx.Load($ctx.Web.ContentTypes)
$ctx.ExecuteQuery()
foreach($cc in $ctx.Web.ContentTypes)
{
$obj=New-Object PSObject
$obj | Add-Member NoteProperty 'ContentType'($cc.Name)
$obj | Add-Member NoteProperty 'Group'($cc.Group)
Write-Output $obj
}
$ctx.Dispose()
}
# Paths to SDK. Please verify location on your computer.
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Publishing.dll"
# Insert the credentials and the name of the admin site
$Username="t@trial345.onmicrosoft.com"
$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
$AdminUrl="https://trial345.sharepoint.com/sites/contenttypehub"
Set-SPOContentType -Username $Username -AdminPassword $AdminPassword -Url $AdminUrl | export-csv C:\Users\ivo\Desktop\CTsGroups2.csv
Related Articles
SharePoint Online content types in Powershell: Add
SharePoint Online content types in Powershell: Get
SharePoint Online content types in Powershell: Edit
SharePoint Online content types in Powershell: Fields vs Field Links
Assign your Content Types back to their default Groups using Powershell - a script at GitHub.