Add-PSSnapIn Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$SiteURL ="http://srvr1:123/sites/cth"
$objSite = Get-SPSite $SiteURL -ErrorAction Stop
$mRootweb= $objSite.Rootweb
$field = $mRootweb.Fields.GetFieldByInternalName("BU")
Write-Host $field.StaticName
#pause
$type = $field.GetType()
$mi = $type.GetMethod("SetFieldBoolValue",
[System.Reflection.BindingFlags]$([System.Reflection.BindingFlags]::NonPublic -bor [System.Reflection.BindingFlags]::Instance))
$mi.Invoke($field, @("CanToggleHidden",$true))
$field.Hidden=$false
Write-Host $field.Hidden "..is the current status befor calling update.."
$field.Update()
$mRootweb.Update()
Write-Host $field.Hidden "..is the current status afterc alling update....."
Write-Host "unhiding the column is done successfully"
i tried the above code for unhiding a site column, but it didnt work.Is there any way i can unhide already hidden site column?
help is appreciated!









