Saturday, May 21, 2016

PowerShell Script to update SharePoint Group type field in SPList


#Get Web Object
$web = get-spweb "Your SharePoint Site Url"

#Get SPListItem
#Here I supposed item id 1
$item = $web.lists['ListTitle'].getitembyid(1);

$GroupName = $web.Groups["SharePoint Group Name"];

$item["WorkflowAssigned"] = $GroupName  ;

$item.update();

#Note: if you do not want to update Modified By & Modified Date then use $item.systemupdate();

No comments:

Post a Comment