Update Site Column Powershell

 admin  
UpdatePowershell column width

In this article we will be seeing how to add a new custom site column and modify the existing site column in SharePoint using powershell scripts.

I have a site column of type 'Text', and users have assign this column a default value at the list level. So now my site column contains null default value, while its child list columns are having a default value per list.

Update Powershell Version

Now i want to apply a JSLINK to this column to hide it from quick edit grid. So I did the following steps inside our test server:-. i add the related javascript file to my site collection's 'Style Library' folder. then i run the following power-shell script to associate the site column with the related jslink:- $web = Get-SPWeb $field = $web.Fields'Customer Initials' $field.JSLink = 'siteCollection/Style Library/JS/HideColumnsINGrid1.js' $field.update($true) now the result is that the JSLINK will be applied to the site column and all its child list columns, which is fine. But what happened is that the list columns' default value have been cleared out since the site column does not have any default value. And seems that applying the JSLINK using powershell will override the specific list column settings.

Powershell Display Columns

So can i do these steps instead of the above:-. to associate the site column with the JSLINK, but without applying this change to any of its child list columns. then to loop through all the lists and define the JSLINK at the list level for the column. In this case any new lists will get the JSLINK associated with the column (since i have apply it to the site column), also existing lists will have the JSLINK associated with the list column and their current default value and settings will not get overridden, Can anyone advice on this please?