Tagged Questions
1
vote
1answer
172 views
Content type ID on a file different from actual content type ID?
Moving from "a sharepoint user" to "a sharepoint power user", I now am facing the world of Powershell and more. One thing that really puzzles me is the following.
Ok, so I have a document library ...
0
votes
3answers
1k views
Add field to List Content Type using Powershell
I'm updating predefined content types with 2 new field, but I have to set the ContentType.Update(false,false).
Which means that it will not propagate the changes to the list content type (instances ...
3
votes
1answer
46 views
Hide SPContenType in use
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
$SPContentType.Update()
I ...
1
vote
3answers
405 views
How to set columns visible only in Display Form on a Column used by a Content Type
I have a column that we will call C. This Column is associated to a Content Type (CT).
If I go to the properties of the CT -> Column C I can set the column to be Facoltative or Hidden:
If I put it ...
1
vote
1answer
159 views
Adding a content type to a list gives me a duplicate field error
I have the following code:
list.ContentTypes.Add(contentType);
It works on my dev environment, but on test fails with the following error:
A duplicate field name "[GUID]" was found.
I've had ...
2
votes
1answer
2k views
How to update a deployed content-type?
I created a content-type and applied it inside a document library. Now, if I go to the conent-type gallery and delete one of the fields, and then go back to the library and view the available ...
2
votes
1answer
96 views
Programatically update field/column name in a list on all sub sites [Powershell]
What I want to do is with a Powershell script programatically go through all subsites in a site collection and change a column name in a list from "Web" to "Site".
So in easier words:
Go through ...
0
votes
0answers
260 views
Unable to create inheriting content types - A duplicate content type was found
I'm trying to create several content types via code, and they are all inheriting from a custom content type which was previously deployed.
Here's the weird part, i can deploy once from Visual studio ...
0
votes
1answer
110 views
How do I add a new ContentType using Feature Upgrading?
I have created a new Content Type. How do I publish it using Update-SPSolution and feature upgrading?
I added the following Code to my Feature Manifest:
<UpgradeActions>
<VersionRange ...
0
votes
1answer
193 views
How to move content within fields in a page layout?
I'm working on a requirement where I'm adding a few fields in an already existing Page Layout and also renaming all the fields. After adding the fields via code,I want to move content within fields ...
2
votes
1answer
161 views
Is it possible to use powershell to change the content type of a page layout after its been uploaded to a masterpage gallery?
Im trying to automate as much of the upgrade I am working on and one of the manual steps is to change the page layout of 5 root webs of site collections, each of which has to have this new page layout ...
0
votes
3answers
3k views
How do I programatically change the content type of an existing file?
Is there some way to change the content type of a file using PowerShell? Ideally I'd like to write a function that one would point at a specific document library and it would pull down an array of ...
2
votes
1answer
629 views
How do you determine the Consumers for a given Content Type?
Is there a quick powershell script to find out all the consumers who are consuming a given content type? If yes, how do you do this with powershell?
3
votes
1answer
3k views
Adding a site column and add it to a content type from PowerShell issue
Within a PS script, I'm trying to add a site column and add this column to a custom content type.
Here is my script :
add-pssnapin Microsoft.SharePoint.PowerShell -EA 0
function ...
3
votes
1answer
690 views
How to remove the builtin “Item” Content Type from a list using powershell?
I have a custom content type and I added this content type to a list.
I now want this list to only use the custom content type and I want to remove the built-in "Item" content type.
I tried
...