single item report every week should be automated

sns 9,246 Reputation points
2020-09-22T05:33:56.407+00:00

single item report every week should be automated and send to local copy , is it possible?
If yes how?

user wants a weekly automated report for a single item in the entire list

SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,763 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Echo Du_MSFT 17,086 Reputation points
    2020-09-22T10:45:11.63+00:00

    @sns

    Please follow these steps:

    1.Write the following PowerShell Script and save it.
    Note: Please test whether this script could run normally in your environment.

    2.Schedule PowerShell Script using Task Scheduler
    a)Open Task scheduler >> Task Scheduler Library >> Create Task
    26437-task1.png

    b)On the General tab, you can set scheduler name.
    26438-task2.png

    c)On the Trigger tab and click New button. In the New Trigger dialog, you can set conditions.
    26349-task3.png

    d)On the Actions tab and click New button to set task actions. Once configured, you can specify conditions to determine whether the task should run. The task will not run if any condition specified here is not true.
    26448-task5.png

    e)On the Settings tab, you can set additional advanced settings to control the task execution
    f)If you want to check script execution, you can click Run by right-clicking task name.
    26474-task6.png

    You could refer to this article How to Schedule PowerShell Script using Task Scheduler.

    3.Upload Weekly Report to SharePoint Document Library

    ===================

    =========================

    @sns
    ……………………Updated Answer……………………………

    $ct | export-csv "c:\$((Get-Date).ToString("yyyyMMdd_HHmmss"))_report.csv"  
    

    It means that I store the weekly Report in the C drive directory and set execution time as the naming rule.
    26350-p1.png

    $ctObject = New-Object -TypeName PSObject   
    $ctObject | Add-Member -Name 'ListTitle' -MemberType Noteproperty -Value $list.Title  
    $ctObject | Add-Member -Name 'DateTime' -MemberType Noteproperty -Value $listItem["Created"]   
    $ct += $ctObject      
    

    It means that the script only collects the specified content of items properties, and then displays them in the weekly Report.
    26475-p2.png

    0 comments No comments

  2. sns 9,246 Reputation points
    2020-09-22T11:28:29.773+00:00

    Hi Echo,

    Thank you for the response.

    Where we will give list name? site URL? and Column names for the item? from below screenshot
    can you please show me.

    26430-capture.png


  3. sns 9,246 Reputation points
    2020-09-23T11:34:42.69+00:00

    Hi Echo,

    I saw update. Thank you. But I am still not clear on how to declare the parameters
    Below is the Item. Can you please amend accordingly and share it me?
    27082-itemdetails.png