IT 관련 이야기/Sharepoint3

sharepoint version history 에서 필드 나타나지 않게 하기

종소리도깨비 2013. 11. 5. 15:35
반응형

 

Sharepoint version history에서 표현되지 않는 필드 설정 하기...

sharepoint 관리쉘 실행.

 

# First load SharePoint Core Assembly
[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)


# SET YOUR PARAMETER HERE FOR url, Listname, fieldname
$url = "http://servername";
$list = "ListName";
$field = "field";

#Setting up context
$contextSite = New-Object Microsoft.SharePoint.SPSite($url);
$contextWeb = $contextSite.OpenWeb();

$list = $contextWeb.Lists.TryGetList($list);
$field = $list.Fields[$field];

# Hides fields from version history
$field.ShowInVersionHistory = 0;;

# Don't forget to update this field
$field.Update();

# And finally dispose everything.
$contextWeb.Dispose();
$contextSite.Dispose();

 

 

반응형