Introduction
Recently, I have faced an issue regarding removing the ‘system column’ from the site content type. The warning says, 'Some system columns cannot be deleted,' as shown in the below screen capture. I have created a custom content type and added ‘Description’, which is there by default, but when removing it from the GUI, I am unable to remove it. The only way to remove the system column from the content type is via PowerShell. For this scenario, I have used the PnP Powershell module.
![System columns screen]()
Steps
Step 1. Connect to the site using SharePoint PnP PowerShell.
Connect-PnPOnline -Url https://contoso.sharepoint.com/teams/mytestsite -UseWebLogin
Step 2. Validate the connection
Get-PnPConnection
Step 3. Run the below powershell command to remove the site column from the content type. While trying to remove from GUI, you would see a message saying that ‘the column cannot be removed’.
![Removing Site Column from SharePoint site content type]()
Remove-PnPFieldFromContentType -Field '<INTERNALFIELDNAME>' -ContentType '<NAMEOFCONTENTYPE>’
In this case, the command below worked for me.
Remove-PnPFieldFromContentType -Field ‘RoutingRuleDescription’ -ContentType ‘RecordRetention’
Step 4. After that, validate the column in the content type, and now you should see that the system column has been removed from the content type.
Note. Please note that the above remove field only removes the column from the content type, and the data associated with the system column is lost, so there is a high chance that the data associated with the system column is not recoverable.
Conclusion
Thus, in this article, we have seen how to remove the system column from the content type using the PnP Powershell module.
References