티스토리 뷰

 

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();

 

 

댓글