Creating Sitecore package using Sitecore PowerShell Extension (SPE)

If you want to move any Sitecore items from one instance to another then we currently use Packaging or Serialization as an OOTB solution. Many times we create a package of the items where it’s template or related items (media library items or rendering items) are missed and we understand it once the package is installed on another instance.

We were carrying out R&D on how can we do it efficiently and found an solution, that we can use Sitecore PowerShell Extension (SPE) for this request.

You can download the latest SPE from here. From the documentation site you can follow the installation steps.

It is rich tool that can be used to address your various requests and the documentation for the same can be found here.

Once the package is installed. You can see the Scripts option when you right click on any item.

Lets understand the steps on how to create the package and download it.

  1. Go to the Content Editor and navigate to the item for which you want to create a package.
  2. Right Click on the item and click on the Scripts.
  3. Click on Packaging >> Start New Package.
  4. Select the option between – Add Item to Package or Add Tree to Package. In case you want the single item to be the packaged then go for ‘Add Item to Package’. In case you want the item with it’s child/descendants then go for ‘Add Tree to Package’.
  5. By default the Installation options are Merge – Merge but it better to select ‘Ask User’. In the ‘Include Linked items’ you can select the options based on your requirement. In this example I want the template and related Media item to be packaged.
  6. Click OK. The process will run the script.
  7. Once the process is completed, the pop up will disappear.
  8. Right click on the item >> Scripts >> Packaging >> Download Package.
  9. Fill in the details like Author, Publisher, Version, etc and click OK.
  10. The pop up to download the package will appear. Click on Download to download the package.

The package of the item with it’s related items is created successfully. Lets learn how to add the multiple items in a single package in next blog.

Thank you.. Keep Learning.. Keep Sitecoring.. 🙂

One thought on “Creating Sitecore package using Sitecore PowerShell Extension (SPE)

  1. Pingback: Creating package using Sitecore Powershell Extensions (SPE) for multiple items | Sitecore Diaries

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s