Posts

Showing posts from March, 2017

Move the list items from one list to another list using PowerShell - SharePoint 2010

Using below script one can move items from one list to another(including CreatedBy/ModifiedBy which are configured in a list(source,target,item age). #*************************************************************************** # Moves list/library items from one location to another location for archiving. Remove-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue $srcListSiteUrl = http://testsite $ConfigListName = "ArchivalConfiguration" $IDFieldName = "OldItemID"  $date = Get-Date -format y $ldate = Get-Date $LogDate = $date -replace " ", "_" $path = "C:\Jobs\ArchivalLog\" If(!(test-path $path)) {     New-Item -ItemType Directory -Force -Path $path } $Logfile = "$($path)\$($LogDate).log" Add-content $Logfile -value "******************************************************************************" Add-cont...

Read list items using REST api with JQuery

$.ajax({     async: true,     crossDomain: true,     url: " http://----------------/sites/-----/_api/Web/Lists/GetByTitle('Menu')/items ",     method: "GET",     headers: {         "accept": "application/json;odata=verbose",         "cache-control": "no-cache",         "postman-token": "452d273c-96f4-d2a1-bd34-463ab627e4ab"     },     success: function (data) {         $.each(data.d.results, function (index, item) {            var id = item.ID;            var title = item.Title;            //var url = item.url;   alert(item.DeptLink);       ...