Prerequisites:
SharePoint Online Management Shell: https://www.microsoft.com/en-us/download/details.aspx?id=35588
PnP – PowerShell Cmdlets: https://github.com/officedev/pnp-powershell/releases
PowerShell Script:
Open SharePoint Online Management Shell and execute the following script.
- ## Connects to a SharePoint Site
- Connect-SPOnline -Url https:
-
- ## Syntax: Set-SPOList -Identity <ListPipeBind> [-EnableContentTypes <Boolean>] [-BreakRoleInheritance [<SwitchParameter>]] [-CopyRoleAssignments [<SwitchParameter>]] [-ClearSubscopes [<SwitchParameter>]] [-Title <String>] [-Web <WebPipeBind>]
- ## Update list settings
- Set-SPOList -Identity "Custom List" -EnableContentTypes $true -BreakRoleInheritance
-
- ##Disconnects the context
- Disconnect-SPOnline