I am trying to perform deserialization with Sitecore Powershell Extensions 251. I cant get deserialization to work. Here is what I did :
I serialized the item sitecore\content\settings\testItem. Serialization was successful, package was created.
Get-Item "master:\content\settings\testItem" | Serialize-Item -Recurse
I delete the item sitecore\content\settings\testItem and try to deserialize it with the command :
Deserialize-Item -Path master:\content\settings\TestItem -Recurse
I get the following exception :
writeErrorStream : True
Exception : System.Exception: path is not under the root
bei Sitecore.Data.Serialization.PathUtils.GetShortPath(String path)
bei Sitecore.Data.Serialization.Manager.LoadTree(String path, LoadOptions options)
bei Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Serialization.DeserializeItemCommand.Deserialize(String path)
bei Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Serialization.DeserializeItemCommand.ProcessRecord()
bei System.Management.Automation.CommandProcessor.ProcessRecord()
TargetObject :
CategoryInfo : NotSpecified: (:) [Deserialize-Item], Exception
FullyQualifiedErrorId : System.Exception,Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Serialization.DeserializeItemCommand
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
PipelineIterationInfo : {0, 1}
PSMessageDetails :
I have searched the web, but I could not find documentation/examples for deserialization. Can anyone write me how to do the deserialization, and if available, refer to the documentation or example resources on the web?`
Thanx
deserialize-item
coomand requires 2 parameters:
Path
- path on the hard drive to the directory
Root
- the location of the serialization
directoryand Recurse
optionally, e.g:
deserialize-item -Path "C:\project\data\serialization\master\sitecore\content\settings" -Root "C:\project\data\serialization\" -Recurse
Update the beginning of the page in the code above so they match your environment.
Here is a blog post explaining serialization and deserialization with Sitecore Powershell Extensions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With