I'm trying to hide (or remove it from the new button drop) a SPContentType that is already in use via Powershell scripting.

Even if before:

$SPContentType.Hidden = $true

I run:

$SPContentType.ReadOnly = $false
$SPContentType.Sealed = $false

The exception error message "Content Type in use" is always throw.

Ideas? Is possible to hide an CTyte that's in use?


this should do a trick:

// Hide old content types.
$SPContentType.Group = "_Hidden";

This will hide ContentType from Site settings but will leave it for all lists and libraries using it in order to save compatibility.

You can find best practices how to manage content types here.

Hope it helps,


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.