List items archival with version history using powershell

HI
Is there any way to work with site and content structure in SharePoint 2010 with power-shell.
I want to run a automated task(power shell script) to move list items from source to destination in the same site with version history.
I know i can do it from site and content organizer but i have to do manually and SharePoint designer workflows doesn't retain the version history.
Please give me  your valuable tips.

Hi Manikanta,
Archive ListItem with Version History in SharePoint, I suggesting you the best links for your solution here
http://techno-sharepoint.blogspot.sg/2012/10/moving-sharepoint-list-items-to-archive.html
http://get-spscripts.com/2011/10/copy-sharepoint-lists-and-document.html
For more details, reach us at
<a href="http://staygreenacademy.com/sharepoint-2013-training/">SharePoint 2013 Online Training</a>

Similar Messages

  • Copying Documents With Version History

    Hello,
    I am working on a ribbon button for SharePoint 2013 with which users (with contribute permissions) can open a dialog to move selected documents to a different library (with the same content type) and enter soms Metadata to be set for the document.
    One of the requirements for this is that the version History should be copied along with the document. Of course I googled for some code that allready does what I want to do and i stumbled upon this blog:
    http://sharepointvenividivici.typepad.com/sharepoint-customization/2011/06/maintain-file-version-history-when-movingcopying-files-between-sharepoint-sites.html
    Because this code also sets the modified and created information for the document the code runs under elevated priviliges because the users do not have the rights to modify that data.
    At first this seemed to be the perfect solution, but after a while we found something truly annoying. The first time you copy the document it works perfectly and the document including version history is being transferred. But the second time the document
    does get copied with the version history but in the version history the modified by is set to System Account for every version.
    Does anyone know what can cause this?
    After doing some more digging, I believe that the problem lies with the following function
    SPFile fileDest = libDest.RootFolder.Files.Add(
                     urlDestFile,
                     streamFile,
                     hashSourceProp,
                     userCreatedBy,
                     userModifiedBy,
                     dateCreatedOn,
                     dateModifiedOn,
                     strVerComment,
                     true);
    This function apparently sets the Created, Created By, Modified and Modified By properties to the values you provide, but when you later try to read this properties with code you get the userwith which you ran the code and not the user you provided. Does
    anyone know a way to fix this?

    Hi,
    According to your post, my understanding is that you wanted to copy documents with version history.
    I had written a simple demo to copy files to another library, and modified the code as below,  you can refer to the following code snippets to check whether it works.
    public static void CopyFileWithVersion()
    using (SPSite site = new SPSite("YourSiteURL"))
    using (SPWeb web = site.OpenWeb())
    SPList sourceLib = web.Lists["Lib1"];
    SPList DestinationLib = web.Lists["Lib2"];
    SPListItem itemSource = sourceLib.GetItemById(2);
    SPFile fileSource = itemSource.File;
    SPUser userCreatedBy = fileSource.Author;
    DateTime dateCreatedOn = fileSource.TimeCreated.ToLocalTime();
    //Get the versions
    int countVersions = itemSource.File.Versions.Count;
    for (int i = 0; i <= countVersions; i++)
    Hashtable hashSourceProperties;
    Stream streamFile;
    SPUser userModifiedBy;
    DateTime dateModifiedOn;
    string strVersionComment = "";
    bool bolMajorVerison = false;
    if (i < countVersions)
    SPFileVersion fileSourceVerison = itemSource.File.Versions[i];
    hashSourceProperties = fileSourceVerison.Properties;
    userModifiedBy = (i == 0) ? userCreatedBy : fileSourceVerison.CreatedBy;
    dateModifiedOn = fileSourceVerison.Created.ToLocalTime();
    strVersionComment = fileSourceVerison.CheckInComment;
    bolMajorVerison = fileSourceVerison.VersionLabel.EndsWith("0") ? true : false;
    streamFile = fileSourceVerison.OpenBinaryStream();
    else
    userModifiedBy = fileSource.ModifiedBy;
    dateModifiedOn = fileSource.TimeLastModified;
    hashSourceProperties = fileSource.Properties;
    strVersionComment = fileSource.CheckInComment;
    bolMajorVerison = fileSource.MinorVersion == 0 ? true : false;
    streamFile = fileSource.OpenBinaryStream();
    string urlDestinationFile = DestinationLib.RootFolder.Url + "/" + fileSource.Name;
    SPFile fileDestination = DestinationLib.RootFolder.Files.Add(
    urlDestinationFile,
    streamFile,
    hashSourceProperties,
    userCreatedBy,
    userModifiedBy,
    dateCreatedOn,
    dateModifiedOn,
    strVersionComment,
    true);
    SPListItem itmNewVersion1 = fileDestination.Item;
    itmNewVersion1["Created"] = dateCreatedOn;
    itmNewVersion1["Modified"] = dateModifiedOn;
    itmNewVersion1.UpdateOverwriteVersion();
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected].
    Jason Guo
    TechNet Community Support

  • How to make a list item field with DATE data type?

    I have a column with DATE data type. Using forms 6i I want to generate a poplist list item field with this column while the value of the elements in the list to will be day names like SATURDAY,SUNDAY,MONDAY. if we change the data type from date to char, it will work properly but now with DATE data type behind it, it gives the following error message
    "FRM-32082: Invalid value for given item type.
    List WEEKREST
    Item: WEEKREST
    Block: EMPRESTS
    Form: MODULE3
    FRM-30085: Unable to adjust form for output."
    Using forms 6i how to make a list item field with DATE data type which can hold day names?

    Set your date column as a hidden (non-displayed) field. Create your list item with the varchar2 day names. Create the list item as a non-base-table field that accepts the text values of day names. On that field, create a when-validate-item trigger that translates the text into a real date, which it then uses to set the value of the actual base-table item.

  • Can we get the list of words with hyphenation breaking used in English:US dictionary?

    Hi,
    I require list of words with hyphenation breaking used in English:US dictionary. I have reviewed in InDesign supporting files in my local folder but I couldn't get. Can anybody assist?
    regards
    Masthan

    InDesign uses Proximity dictionaries for most languages to verify spelling and to hyphenate words. You can add words to each dictionary to customize it. You can assign different languages to text, and InDesign uses the appropriate dictionary to handle spelling and hyphenation.
    There are possible breakpoints the dictionary will consider and then show up in the InDesign , if you want to know between which two syllables Indesign’s dictionary prefers to hyphenate, and what other possible breakpoints the dictionary will consider.
    Choose Edit > Spelling > User Dictionary.
    In the Language menu, choose a language. Each language contains at least one dictionary. If you want the word to be added to all languages, choose All Languages.
    In the Target menu, choose the dictionary where you want to store the word. The Target menu lets you store the changes in an external user dictionary or in any open document.
    In the Dictionary List menu, choose Added Words.
    In the Word box, type or edit the word to be added to the word list.
    Click Hyphenate to see the word’s default hyphenation. Tildes (~) indicate possible hyphenation points.
    If you don’t like the hyphenation points, follow these guidelines to indicate your preferred hyphenation of the word:
    Type one tilde (~) to indicate the best possible hyphenation points, or the only acceptable hyphenation point, in the word.
    Type two tildes (~~) to indicate your second choice.
    Type three tildes (~~~) to indicate a poor but acceptable hyphenation point.
    If you want the word never to be hyphenated, type a tilde before its first letter.If you need to include an actual tilde in a word, type a backslash before the tilde (\~).
    Click Add, and then click Done. The word is added to the currently selected Dictionary List.
    Note: Remember that hyphenation points interact with the hyphenation settings in your documents. As a result, the word might not break where you expect it to. Control these settings by choosing Hyphenation in the Paragraph panel menu.
    By default, hyphenation and spelling exceptions are located in user dictionary files stored outside the document on the computer where InDesign is installed (dictionary file names end with a .clam or .not extension). However, you can also store exception lists inside any InDesign document. In addition, you can store word lists in an external user dictionary, in the document, or in both. The location of existing dictionaries appears in the Dictionary preferences.

  • List Item "Shared With" dialog error

    Just recently I started getting an error whenever I use the "Shared With" button on a list item to set permissions for the item. The dialog comes up, but the loading symbol continues to run and the Invite People, Email Everyone and Advanced options
    are not displayed. I ran a debugger while loading the dialog and came up with this error:
    Error: The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly
    requested.
    The error occurs in the sp.js file. The java script was never altered and there was no list or site changes. This occurs on all list items within the site farm. The only things I can think of that were changed is Windows was updated on the server running
    SharePoint. Has anyone seen problems like this before?

    There should be two possible ways to fix this:
    As mentioned by Kelly above, it looks like the issue was introduced by update KB2899508 - uninstalling
    that update should get you going again (haven't tried that one myself).
    Fix the broken file(s)
    the problem is in sharing.js (production version) and sharing.debug.js (debug version). Both files can be found at \Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS
    production: 
    change 
    k.load(g,"ID","FileRef","FileLeafRef","Client_Title")
    to:
    k.load(g,"ID","FileRef","FileLeafRef","Client_Title","Title")
    debug:
    change
    cctx.load(listItem, 'ID', 'FileRef', 'FileLeafRef', 'Client_Title');
    to
    cctx.load(listItem, 'ID', 'FileRef', 'FileLeafRef', 'Client_Title', 'Title');
    I've made my changed files available for download; I recommend you only use these as reference and not actually use files downloaded from some random web site on a production system.
    http://www.bene.priv.at/sharepoint/sharing.debug.js
    http://www.bene.priv.at/sharepoint/sharing.js
    Hope this helps.

  • Retrieving list items from a specific view using CSOM

    How can I query a specific view of a SharePoint List using the C# CSOM? I am dealing with SharePoint Online, so the only option is to use SharePoint.Client.
    I have done this using Javascript, and I know how to do this with SharePoint On-Premises, but I haven't found a way to do with for SharePoint online using C#.

    hi Dkhouri,
    thanks for posting your issue, you can create a specific view of a list using CSOM and C#.
    Kindly find the code snippet below fort he same.
    Code for CSOM :- 
    // Starting with ClientContext, the constructor requires a URL to the
    // server running SharePoint.
    ClientContext context = new ClientContext("http:SiteUrl");
    // Assume the web has a list named "Announcements".
    List announcementsList = context.Web.Lists.GetByTitle("Announcements");
    // This creates a CamlQuery that has a RowLimit of 100, and also specifies Scope="RecursiveAll"
    // so that it grabs all list items, regardless of the folder they are in.
    CamlQuery query = CamlQuery.CreateAllItemsQuery(100);
    ListItemCollection items = announcementsList.GetItems(query);
    // Retrieve all items in the ListItemCollection from List.GetItems(Query).
    context.Load(items);
    context.ExecuteQuery();
    foreach (ListItem listItem in items)
    // We have all the list item data. For example, Title.
    label1.Text = label1.Text + ", " + listItem["Title"];
    For C# 
    public CamlQuery CreateInventoryQuery(string searchSku)
    var qry = new CamlQuery();
    qry.ViewXml =
    @"<View>
    <Query>
    <Where>
    <BeginsWith>
    <FieldRef Name='SKU' />
    <Value Type='Text'>" + searchSku + @"</Value>
    </BeginsWith>
    </Where>
    </Query>
    </View>";
    return qry;
    Also, checkout below mentioned URLs for more details
    http://www.c-sharpcorner.com/UploadFile/sagarp/sharepoint-2013-caml-query-for-item-id-with-jquery/
    http://msdn.microsoft.com/en-us/library/ff798388.aspx
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Sum child list items and update parent total using javascript

    I have a SharePoint 2010 Parent/Child list setup using a lookup field to join both the lists, this is working well.
    The Parent list contains requisition requests and the child list contains related item details. Each of the related child list items has a 'Line Item Total' field. I need to aggregate the Line Item Totals in the child list and place the result in a 'Requisition
    Total' in the parent. So for any given parent record the sum of it's related child 'Line Item Totals' is reflected in the 'Requisition' total in the parent row.
    I am struggling with the JavaScript code below. I am trying to aggregate Line Item Totals for a given Requisition#? Could someone please review and advise?
    <script language="javascript" src="/Purchasing/Documents/jquery-1.8.2.js" type="text/javascript"></script>
    <script language="javascript" src="/Purchasing/Documents/jquery.SPServices-2014.01.min.js" type="text/javascript"></script>
    <script>
    $(document).ready(function()
     $('select[title=Requisition#]').children().attr('disabled',true);
     $("input[title='Old Amount']").attr("readonly","true").css('background-color','#F6F6F6');
       // Retrieve the name of the selected parent item.
       var strParent=$("select[title$='Requisition#'] :selected").text(); 
     splist li = web.lists["ReqDetails"]; // This is the child list
        spquery q = new spquery();
        q.Query= "<Where>" +
         "<And>" +
          "<Neq>" +
           "<FieldRef Name='ID'/><Value Type='Number'>0</Value>" +
          "</Neq>" +
          "<eq>" +
           "<FieldRef Name='LinkID'/><Value Type='Number'>ReqID</Value>" +
          "</eq>" +
         "<And>" +
        "</Where>" +
        "<OrderBy>" +
         "<FieldRef Name='LineItemTotal'/>" +
        "</OrderBy>"
        q.ViewFields = string.Concat("<FieldRef Name='LineItemTotal' />");
        q.ViewFieldsOnly = true; // Fetch only the data that we need
        splistitemcollection items = li.getitems(q);
        foreach(SPListItem item in items)
        sum += parseInt(item["LineItemTotal"], 10);
      alert(sum)
     </script>
    Rick Rofe

    I do something similar for a PO Header/PO Detail set of lists. I use SPServices to pull the data.
    I put this code in the child edit page - so any time any child is edited, the parent is updated. I get all children records and total them up (except for the item I'm displaying at the current time. I add that value in directly from the form itself.
    <script type="text/javascript" src="/Javascript/JQuery/JQueryMin-1.11.1.js"></script>
    <script src="/Javascript/JQuery/jquery.SPServices-2014.01.min.js"></script>
    <script>var poNumber = '';
    var poDetailID = '';
    $(document).ready(function() { var queryStringVals = $().SPServices.SPGetQueryString();
    poNumber = queryStringVals["PO"];
    poDetailID = queryStringVals["ID"];
    function PreSaveAction() {
    // update the PO header with the total of all items + shipping + adjustments
    var query = "<Query><Where><And><Eq><FieldRef Name='Title' /><Value Type='Text'>" + poNumber + "</Value></Eq><Neq><FieldRef Name='ID' /><Value Type='Counter'>" + poDetailID + "</Value></Neq></And></Where></Query>";
    var viewFields = '<ViewFields><FieldRef Name="Total" />';
    viewFields += '</ViewFields>';
    var poTotal = 0.00;
    $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "PO Details",
    webURL: "/po",
    CAMLViewFields: viewFields,
    CAMLQuery: query,
    completefunc: function (xData, Status) {
    //alert(xData.responseText);
    $(xData.responseXML).SPFilterNode('z:row').each(function() {
    if($(this).attr("ows_Total")) {
    //alert($(this).attr("ows_Total"));
    poTotal += Number(parseFloat($(this).attr("ows_Total").split(";#")[1],2).toFixed(2));
    // add in this changed line (we skipped it above)
    var qty = $('input[title="Quantity Ordered"]').val();
    var price = $('input[title="Price"]').val().replace(',','');
    var extend = Number(qty)*Number(price);
    poTotal += extend;
    //alert(poTotal);
    // update the PO Header
    $().SPServices({
    operation: "UpdateListItems",
    async: false,
    listName: "Purchase Orders",
    webURL: "/po",
    ID: poID,
    valuepairs: [["Total", poTotal]],
    completefunc: function (xData, Status) {
    //alert(xData.responseText);
    $(xData.responseXML).SPFilterNode('z:row').each(function() {
    return true;
    Robin

  • AR open Items Migration with Dunning history

    Dear Experts,
    Please could you share your opinion and experience in the below issue
    We are migrating AR open items data from one company code (say AB01) to another company code (say AB02) within SAP, we are following the approach, download AR open items fromAB01 and Migrate to AB02 with same parameters of AB01 (document date, baseline date, assignment number, text, payment terms every thing is same, there will be no change)
    Now the question Iu2019ve is whether dunning history can migrate to company code AB02, please have a look it the following example to understand the issue
    AB01 data
    Customer      Open item amount     Current dun level     last dun date
    100015     1000               1     10.05.2009
    100015     2500               2     10.05.2009
    100015     500               4     10.05.2009
    Over all customer dunning status is : Highest level is 4
    Now we wanted to migrate same data to AB02 including dunning history.
    Certainly, we can migrate above open items data with dunning level, and master data history as well.
    Having said that, will the system able to dun next dunning level in AB02 (in the above example it should be level 5). .?
    Please could you advise me possible options which you had come across.
    My opinion is, system has to determine levels and update history in systematic way, rather than manipulating in our style.
    (Information: Iu2019d had quick test migrating test data into new company code AB02 including history which is same as AB01 and MHNK table history, even though system has not picked next dunning level)
    Would appreciate your replies.
    Regards
    Prab

    Hi,  I'm wanting to do the same thing.  Were you able to figure this out?  Regards, Adrien.

  • How to print out document list items (and with all comments!)

    Hi all,
    I am wondering how to get a good printout of document lists.
    In a web application I have some document list items and the users are adding many comments in it, so that the document list item doenst show all in the initial view, but scroll buttons to navigate up and down.
    I was surprised to read that the standard print functionality doesnt support document items.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/68ce8391886e47e10000000a422035/content.htm
    How can I print out a list of all document list items with all comments?
    Ist there a workaround?
    thanks in advance for sharing your experiences, br, Michael

    Thanks guys for trying to help me...
    Gabriel, I not wanna do "a lot of trix" to get this out of iCal when it should be solved by iCal (from my point of view).
    Dancing Brook, Yes I hope we will see that in the future. I am convinced that there is many of us out there who want to see that function in iCal, even if they not really missed it yet.
    I have already sent a request to iCal feedback (hope they noted). Maybe they will if we are many doing so...

  • How to send current list item URL in email by using sharepoint 2010 workflow?

    Hi All,
    I had created sharepoint workflow usind SPD 2010. when new item is created it sends the email with link. But it sends current list link not the current item link.
    I tried to use Encoded Absolute URL but this like
    http://asdf.com/Lists/abc/10.00
    but i need something like this
    http://asdf.com/Lists/abc/DispForm.aspx?ID
    I have grow thorough some post and i found that,
    Statically i can write http://asdf.com/Lists/abc/DispForm.aspx?ID= and from Add lookup i can get ID by choosing current item.
    The link which i get is partially hyperlink like this
    http:aasdf.com/Lists/abc/DispForm.aspx?ID=10 (here 10 is not hyperlink)
    when i copy and paste this link it works fine but by clicking it i am not getting true result.
    Please help me to solve this issue.
    Thanks.

    Hi Raymond,
    It works for me. Thank you so much.
    I also have another issue related workflow. If you can help me, i really appreciate you.
    I already configured AAM. I have two Share Point Address which are:
    Default : http://default.com
    Internal : http://intranet.com
    I have List workflow using SharePoint Designer 2010. When new item get create, it sends email to person for approval. But when it sends email it sends Dafault zone URL.
    Dafault zone URL is only accessible through Virtual Machine. We cant access from local machine. So i need to send intranet zone URL in email so user can open through local machine.
    I tried it but i can only able to do for one list. I have to so this general for every list.
    How can i send intranet zone URL?
    Swapping the zone URL is not solution for this issue because after swapping situation is same.
    Thank You.

  • Copy Attachments of sharepoint list item to a document library using Javascript on click of a button

    The requirement is as follows:
    1. We have a SP list. All items in the list have mulitple attachments.
    2. On click of a button, All the attachments of all items should be copied to a document library
    This is to be done from client side only. No server code is acceptable. We have tried following things:
    1. USing Asynch call
    context = new SP.ClientContext("my site name");
             this.oWebsite = context.get_web();
             var lists = oWebsite.get_lists();
             var list = lists.getByTitle('my list name');         
             context.load(oWebsite);
             var folderPath = 'Lists/<my list name>/Attachments/' + folderId;
             var Folder = oWebsite.getFolderByServerRelativeUrl(folderPath);
             context.load(Folder);
             Files = Folder.get_files();
             context.load(Files);
             context.executeQueryAsync(Function.createDelegate(this, this.ExecuteCopyOnSuccess), Function.createDelegate(this, this.ExecuteCopyOnFailure));
    function ExecuteCopyOnSuccess(sender, args) {        
             for(var p=0;p<this.Files.get_count();p++)
         var file = Files.itemAt(p);    
              var filename = file.get_name();      
              if (filename != null) {
                  var newUrl = 'document library url';
                  file.copyTo(newUrl, true);
                  context.executeQueryAsync(null,null);
    In this case, Files.get_count() throws error - The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
    2. Using copy.asmx service
    It copies files to document library but some files are blank and are having size 0.
    Thanks!

    Hi,
    I think you can use Document Content types or document sets -
    Here are links that you can refer to
    http://office.microsoft.com/en-us/windows-sharepoint-services-help/introduction-to-content-types-HA010121570.aspx
    http://msdn.microsoft.com/en-us/library/office/ms472236(v=office.14).aspx
    http://office.microsoft.com/en-us/sharepoint-server-help/create-and-configure-a-new-document-set-content-type-HA101782461.aspx
    http://office.microsoft.com/en-us/sharepoint-server-help/introduction-to-document-sets-HA101782466.aspx?CTT=5&origin=HA101782461
    Hope this helps!
    MCITP: SharePoint 2010 Administrator
    MCTS - MOSS 2007 Configuring, .NET 2.0
    | SharePoint Architect | Evangelist |
    http://www.sharepointdeveloper.in/
    http://ramakrishnaraja.blogspot.com/

  • How to get list of all sp farm solutions using powershell?

    is there any powershell script can list down all solutions deployed on farm in txt or cvs file?

    Thanks. but this is showing all features. I need only our custom developed features
    Get-SPFeature >> c:\temp\feature.txt
    Let me know how to get?

  • Replacing character and number e.g #1154;#" with a comma using powershell

    Hi there,
           How can i replace
    I have a string like below  and would like to replace ";#1154;#" with a comma.
    tried using (;#)\d{4}(;#)" but it doesnt work
    Amber Wood;#1154;#John Roberts;#1121;#Peter Ma;#1597;#
    Thanks in Advance
    Output should be : 
    Amber Wood,John Roberts,Peter Ma

    The regex is almost right, but you don't need the normal brackets. If you remove them as per :
    $a = "Amber Wood;#1154;#John Roberts;#1121;#Peter Ma;#1597;#"
    $b = $a -replace ";#\d{4};#",","
    $b
    you'll see that works.

  • Create Device Collection WITH Refresh Schedule using Powershel CMDLets

    Hello everyone
    I'm attempting to create a PowerShell script to create a device collection and I'm running into a very frustrating issue.  I want to be able to set the collections refresh time but can't seem to get it to work.  This code here works to create the
    collection and tell it to do incremental updates but I cannot figure out how to set refresh time.  Everything I've attempted has failed and google seems to be no help right now.
    $CollectionName = "Test"
    $CollectionQueryValue = 'select * from SMS_R_System inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_SYSTEM.NetBIOSName in ("Hostname")' $CollectionQueryName = "Direct by Hostname"
    New-CMDeviceCollection -Name $CollectionName -LimitingCollectionName "All Systems" -RefreshType ConstantUpdate
    Thanks for your help!

    I haven't tried it, but the following should work:
    $Sched = New-CMSchedule -Start "01/02/2014 1:00 AM"
    -DayOfWeek Sunday -RecurCount 1
    New-CMDeviceCollection -Name "C1"
    -LimitingCollectionName "All Systems" -RefreshSchedule $Sched -RefreshType Both
    Torsten Meringer | http://www.mssccmfaq.de

  • Deleting a List Item with Very Huge Amount of Versions

    A faulty workflow flooded list items with 50K+ versions on SharePoint List. Attempts to open the list item/delete/edit via SharePoint UI/PowerShell failed! Programmatic iterations to delete versions/items trys to consume complete server memory and
    fails.
    Deleting the complete list is successful, but that results in SharePoint timer jobs fail and places Lots of Block in the database, which stops SharePoint sites from loading.
    Any help please?

    SP 2010 and 2013 support a max of 50,000 versions. Accessing more than 5000 items at a time causes SQL Server to escalate from row locks to table locks, which will generally bring SharePoint to a stop. You will need to write code that can bring back subsets
    of the data, and the only approach I can think of is a CAML query. But, I can't find any examples of working with versions using CAML.
    You could just change the Throttling settings in Central Admin from the default of 5000 to 50000 and then run your code during off hours.
    Mike Smith TechTrainingNotes.blogspot.com
    Books:
    SharePoint 2007 2010 Customization for the Site Owner,
    SharePoint 2010 Security for the Site Owner

Maybe you are looking for

  • Can't post to User Tips forum

    Though I can post replies or topics elsewhere, I can't post to User Tips Forum. Thanks RS

  • Copy Selected Fimnder Items weirdness

    Hi, I have a simple automator script. It's pupose is to shift some stuff of my local machine, to a network share. But I can't get it to work reliably. It has the following actions: 1. Get Specified URLs - Specifies the URL to the server share 2. Conn

  • Web applet loadlibrary problem

    Hello, According to http://java.sun.com/sfaq/example/loadLibrary.html A web applet should be able to load a library from a method in the classpath. However, when I run my web applet, I get the error: java.security.AccessControlException: access denie

  • HELP! Unknown error [R2Wd] when using Live trace....

    Using CS3 Photo: black and white line drawing... tried re-saving this in as many formats as possible then placing into Illustrator to live trace... Tiff, PSD, EPS, JPG, Bit Map, etc etc... tried Black and white, cmyk, rgb... so far... nothing.... but

  • Frequent error Failed to execute runnable (java.lang.NullPointerException)

    Would anyone know what module this stack-dump is related to? I get it quite often in OSB during the publish event.: org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:3563)