Powershell script to copy column items for one column to another column within the list

InfoPath alternatives for form designing SharePoint

In this post we will discuss about powershell script to copy column items from one column to another column within the list in SharePoint 2010.

Also you can check out some posts on:

– Create a sequential workflow using Visual studio 2010 in SharePoint 2010

– Enable Anonymous access to a SharePoint 2013 site

– SPDisposeCheck for SharePoint 2010

PowerShell script for copying column items for one column to another within the list:

Add-PSSnapin Microsoft.Sharepoint.Powershell
[System.reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)
$site = new-object Microsoft.SharePoint.SPSite(“SiteURL”)

$web = Get-SPWeb -Identity siteURL

$lista =$web.Lists[“ListName”]

$items = $lista.items

foreach ($item in $items) {
$user = $item[“Source column”]
write-host $useracc

$useracc = $web.EnsureUser( $user);

$item[“Desination column”] = $useracc

write-host $useracc

$item.update()
}

$lista.update()

Hope this will work!!!

Similar SharePoint 2013 Tutorials


Leave a Reply