I've inherited a SP site that has ~30,000 site collections. In turn these site collection each have typically one site (can have more but they don't). From everything I can comprehend this is a bad way to set up the SP site but I am stuck with it.
There is a list/list in each site that should have 10 content types.
I've been able to write some code that will catalog each collection/site and tell me the list of content types. I'm finding many only have 6,7,8 or 9; some even 11 Content Types. They all should have 10 and the same 10.
I can programmatically change the name of existing Content Types, I can even delete where there is 11 to make 10. I can't seem to figure out how to add a new one to an existing list that has less than 10.
Can anyone share a bit of C# code that would add Content Types to an existing list? If it would be easier in Power Shell that is fine too.