Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey!
I want to deserialize sitecore item using PowerShell Console, I tried using below script

PS:master:\>deserialize-item -path "C:\Users\naveen_s\Desktop\serialization\serialization\master\sitecore\sytem\Modules" -root "C:\Users\naveen_s\Desktop\serialization\serialization\" -recurse


under modules path I have an Item as well as sub folder under that again I have an Item.

So, using recurse I try to deserialize the data for childs also.

I refereed below link http://www.cognifide.com/blogs/sitecore/serialization-and-deserialization-with-sitecore-powershell-extensions/#.VgQMncuqqko

but, I'm getting error like below after execute the above script in power shell console in sitecore.

Error details:
Hide   Copy Code
writeErrorStream      : True
Exception             : System.Exception: path is not under the root
                           at Sitecore.Data.Serialization.Manager.LoadTree(String path, LoadOptions options)
                           at Cognifide.PowerShell.Commandlets.Serialization.ImportItemCommand.Deserialize(String path)
                           at Cognifide.PowerShell.Commandlets.Serialization.ImportItemCommand.ProcessRecord()
                           at System.Management.Automation.CommandProcessor.ProcessRecord()
TargetObject          :
CategoryInfo          : NotSpecified: (:) [Import-Item], Exception
FullyQualifiedErrorId : System.Exception,Cognifide.PowerShell.Commandlets.Serialization.ImportItemCommand
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails      :


What I have tried:

de-serialize sitecore item with Powershell console
Posted
Updated 10-Apr-16 7:06am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900