Creates a new Sitecore install package object.


New-Package [-Name] <String>

Detailed Description

Creates a new Sitecore install package object that allows for further addition of items and files & further export to file.

© 2010-2017 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions


-Name  <String>

Package name

Required? true
Position? 1
Default Value
Accept Pipeline Input? false
Accept Wildcard Characters? false


The output type is the type of the objects that the cmdlet emits.

  • Sitecore.Install.PackageProject


Help Author: Adam Najmanowicz, Michael West



Following example creates a new package, adds content/home item to it and saves it in the Sitecore Package folder+ gives you an option to download the saved package.

# Create package
       $package = new-package "Sitecore PowerShell Extensions";

# Set package metadata

       $package.Metadata.Author = "Adam Najmanowicz - Cognifide, Michael West";
       $package.Metadata.Publisher = "Cognifide Limited";
       $package.Metadata.Version = "2.7";
       $package.Metadata.Readme = 'This text will be visible to people installing your package'

# Add contnet/home to the package
$source = Get-Item 'master:\content\home' | New-ItemSource -Name 'Home Page' -InstallMode Overwrite

# Save package
       Export-Package -Project $package -Path "$($package.Name)-$($package.Metadata.Version).zip" -Zip

# Offer the user to download the package
       Download-File "$SitecorePackageFolder\$($package.Name)-$($package.Metadata.Version).zip"

results matching ""

    No results matching ""