SPListItem.Update不起作用 [英] SPListItem.Update not working

查看:62
本文介绍了SPListItem.Update不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过执行item.Update方法来更改SharePoint列表Item Modified时间戳.修改者字段已更新,但修改后的时间戳未更新.以下是我使用的powershell脚本.请让我们知道此问题的解决方法.

I tried to change a SharePoint list Item Modified timestamp by executing item.Update method. The modified by field got updated but the modified timestamp did not get updated.Below is the powershell script i used. Please let us know the fix for the issue.

$ site = Get-SPSite"{{site collection url}""
$ web = $ site.OpenWeb()
$ item = $ web.GetListItem($ _.文件URL")
$ item.Update()

$site = Get-SPSite "{site collection url}"
$web = $site.OpenWeb()
$item = $web.GetListItem($_."File URL")
$item.Update()

谢谢

Vamshi


推荐答案

我已经开发了用于更改修改后的时间戳的PowerShell脚本,

i've developed PowerShell script for changing the modified time stamp,

1-这是执行PS脚本之前旧值的屏幕截图

1- here's a screenshot of old values before executing the PS script

2-这是经过完整测试的PS脚本,用于更改修改日期.

2- Here's the full tested PS script for changing the modified date.

Add-PSSnapin Microsoft.SharePoint.Powershell -ea SilentlyContinue
 
#set the web url and the list name to work upon


url ="http://spwf"
url = "http://spwf"


listName ="Documents"
listName = "Documents"


这篇关于SPListItem.Update不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆