Quantcast
Channel: SharePoint 2010 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 13778

Powershell - how to unhide a hidden site column?

$
0
0

Hello,

I have used the following script to hide a field from the user community. It needed to be both - invisible inside Sharepoint content types and within the DIP (Document Information Panel) within Office 2010.


## Reference to SharePoint DLL


# Specify url of the sitecollection
$hostheader = "http://workspace"

$site=new-object Microsoft.SharePoint.SPSite($hostheader)
$rootweb = $site.rootweb

$column = $rootweb.fields.GetFieldByInternalName("AdditionalData")
$column.required = $false
$column.ShowInDisplayForm = $false
$column.ShowInEditForm = $false

$column.ReadOnlyField = $true
$column.Update($true)

The question is now.. how can I unhide this field again?

The column's property hidden is set to true. I cannot directly set this property as it says thathidden"is a read only property".

What do you propose?

Sven


Viewing all articles
Browse latest Browse all 13778

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>