Quantcast
Channel: SharePoint 2010 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 13778

Change Modified by

$
0
0

Hi 

Just migrated from one Domain to another - and my user account have edited some site pages, so I now are seen in the 'Modified By' - I would like to change this to the System account/Farm Account 

I found this Script - but need Help to change this to only the 'Modified by' - not touching the 'Created By': 

[Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
$SPSite = New-Object Microsoft.SharePoint.SPSite("http://dev/") $SPWeb = $SPSite.OpenWeb() $SPList = $SPWeb.Lists["ModifyCreatedBy"] $SPListItemCollection = $SPList.Items foreach ($ListItem in $SPListItemCollection) { $SPFieldUserValue = New-Object Microsoft.SharePoint.SPFieldUserValue($SPWeb,8, "contoso\myuser") $ListItem["Author"] = $SPFieldUserValue $ListItem.Update() } $SPWeb.Update()


Viewing all articles
Browse latest Browse all 13778

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>