0
votes
0answers
11 views

change the data type of a sharepoint column from the content type using powershell

i have been trying to change the data type of a field called "EmployeeName" from Number to Text - which is associated with a Infopath form Library in SharePoint 2010 env
0
votes
1answer
64 views

SharePoint 2010 - Title field not showing up in list of columns for Content type created using Powershell

I have used following power-shell script for creating a new content type with one custom column. $siteURL = "My Site URL" $contentTypeName = "Test Content Type 1" $contentTypeGroupName = "Content ...
0
votes
0answers
11 views

Update folders to folder content type

I have a document library with root folders and then sub-folders. I need to update the sub folders to a newly created content type. Is there a way to do this with powershell? Example: Document ...
1
vote
0answers
120 views

Can't update SPField through PowerShell - object has been updated by another user since it was last fetched

I get the following error when trying to update the choices for a Site Column: "The object has been updated by another user since it was last fetched." I get this error if I try to add a new choice ...
0
votes
1answer
35 views

How do I get a content type's parent name via powershell?

I am attempting to write a powershell script to pull content type names applied to lists, and their respective parent content type name. Unfortunately, I seem to have run into a hurdle - whenever I ...
0
votes
2answers
33 views

How can I find out if a column is unused powershell

I have noticed in some of my document libraries that I have a column that is unused. Is there a bit of code in powershell that will tell me which document libraries have the column in question but it ...
1
vote
1answer
86 views

How to AddItem with certain ContentTypeID using PowerShell

I am using PowerShell to add 100 items which need to be of a specific ContentType. (requirement) Test my custom events receiver using powershell. The test is to create a list with a custom content ...
0
votes
1answer
57 views

Export root site content types and selected properties to csv

I want to recreate a clients' ct structure using VS2012 so some cts and their guids I did have a go but it would be nice only to add the properties I want to my csv file rather than whole lot.. Any ...
1
vote
2answers
1k 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
5k 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
107 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 ...
2
votes
4answers
3k 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
362 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 ...
4
votes
1answer
7k 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
281 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
1answer
210 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
334 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
336 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 ...
2
votes
3answers
8k 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
1k 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?
4
votes
1answer
6k 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
1k 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 ...