1

We are working on Sitecore Upgrade and would like to merge the item changes for the particular period.

If we try to use item dynamic package, it is taking longer time and timed out somewhere.

Is there any way to take by using Sitecore powershell and if the item count is more, we have to split up as separate packages.

1 Answer 1

5

You can go through this link - https://www.nishtech.com/Blog/2020/April/Advanced-content-packaging-with-Powershell

Step 1 - Use Powershell Reports to get the modified items CSV file

To find the Powershell Reports, open the Sitecore in Desktop Mode, then click at the Reporting Tools menu item, as shown in the image below.

enter image description here

In our example, we are using the “Items last updated after date“ report. In the configuration pop-up, select the Report Root in the content tree, and the After Date and Time.

enter image description here

Since we are deploying our Sprint content, we will input the date when the Sprint actually started, so the resulting list will only include the items modified during the sprint.

The reporting results can be conveniently browsed and reviewed. Double-clicking a row will pop-up the item in Content Editor.

enter image description here

Go ahead and download the CSV file by clicking in the highlighted icon.

Step 2 - Open and Review in Excel

The CSV file generated in the last step can now be opened in Excel, enabling your team to easily review and modify the file by using Excel features such as Sort and Filter.

enter image description here

Your team can be consulted to confirm which of their items are supposed to be included in the package, and what should not be there. For that, you can use the “Updated by“ column to identify the user who modified the items.

Feel free to modify the file as you want, removing the lines that should not be included. As long as the column names are kept, and you have no empty rows, it should be good.

Step 3 - Convert the CSV file into a Sitecore Package

Now that your spreadsheet is properly revised and adjusted, we will use it to generate the Sitecore Package with the items present in your CSV file.

For that, you will need the following Custom Powershell Script - Create Package from Report CSV file.ps1

  1. Powershell Script itself or
  2. Sitecore Package for quick installation

If you either install the package above or manually create the script under the path /sitecore/system/Modules/PowerShell/Script Library/Package Generator/Toolbox, you will then be able to trigger this script from the Powershell Toolbox.

enter image description here

The script will prompt the user to upload the revised CSV file.

enter image description here

After finished, the user is prompted to download the generated package

enter image description here

Step 4 - Install the package

When the time comes, use the Sitecore Installation Wizard to install the package - don’t forget to trigger a publish when the installation finishes!

3
  • 1
    A nice feature request for SPE would be to create package from the report screen. Oct 21, 2022 at 14:08
  • Yeah, that would be great! Oct 22, 2022 at 9:04
  • @GauravAgarwal Is there any way to give Start and End Date to create the report?
    – Astle
    Nov 3, 2022 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.