Exports (serializes) the Sitecore item to the filesystem.
Export-Item [-Entry <IncludeEntry>] [-Recurse] [-ItemPathsAbsolute] [-Root <String>]
Export-Item [-Item] <Item> [-Recurse] [-ItemPathsAbsolute] [-Root <String>]
Export-Item [-Path] <String> [-Recurse] [-ItemPathsAbsolute] [-Root <String>]
Export-Item -Id <String> [-Database <String>] [-Recurse] [-ItemPathsAbsolute] [-Root <String>]
The Export-Item command serializes Sitecore items to the filesystem. The alias for the command is Serialize-Item. The simplest command syntax is: Export-Item -path "master:\content"
or
Get-Item "master:\content" | Export-Item
Both of them will serialize the content item in the master database. In first case we pass the path to the item as a parameter, in second case we serialize the items which come from the pipeline. You can send more items from the pipeline to the Export-Item command, e.g. if you need to serialize all the descendants of the home item created by sitecore\admin, you can use:
Get-Childitem "master:\content\home" -recurse | Where-Object { $_."__Created By" -eq "sitecore\admin" } | Export-Item
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
The following abbreviations are aliases for this cmdlet:
Serialize-Item
Serialization preset to be serialized. Obtain the preset through the use of Get-Preset command.
Process the item and all of its children - switch which decides if serialization concerns only the single item or the whole tree below the item, e.g.
Export-Item -path "master:\content\articles" -recurse
Root - directory where the serialized files should be saved, e.g. Export-Item -path "master:\content" -Root "c:\tmp"
Works only with Root parameter and decides if folder structure starting from "sitecore\content" should be created, e.g. if you want to serialize articles item in directory c:\tmp\sitecore\content you can use. For example: Export-Item -Path "master:\content\articles" -ItemPathsAbsolute -Root "c:\tmp"
Directory where the serialized files should be saved, e.g.
Export-Item -Path "master:\content" -Root "c:\tmp"
The item to be serialized.
Path to the item to be processed - can work with Language parameter to narrow the publication scope.
You can pass the id of serialized item instead of path, e.g. Export-Item -id "{0DE95AE4-41AB-4D01-9EB0-67441B7C2450}"
The input type is the type of the objects that you can pipe to the cmdlet.
Sitecore.Data.Items.Item
Help Author: Marek Musielak, Adam Najmanowicz, Michael West
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
true (ByValue, ByPropertyName)
Accept Wildcard Characters?
false
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
Required?
true
Position?
1
Default Value
Accept Pipeline Input?
true (ByValue, ByPropertyName)
Accept Wildcard Characters?
false
Required?
true
Position?
1
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
Required?
true
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
Required?
false
Position?
named
Default Value
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
PS master:\> Export-Item -Path master:\content\home