Sitecore PowerShell:删除项目不删除,如何排除故障?

问题描述 投票:0回答:1

我有简单的Sitecore / PowerShell脚本,我删除图像子项并发布父项:

$child1 = Get-Item $child1Path
Remove-Item $child1 -Force -Permanently 
Publish-Item -Item $parent1 -Recurse -PublishMode SingleItem -Language "en*"

运行时没有删除也没有错误。

如何找出不删除的原因?

powershell sitecore sitecore8
1个回答
1
投票

您可以将Remove-Item与-Path参数一起使用。或者使用

$ child1 |除去项目

显然你的脚本不会抛出错误,但删除不是那样的。请参阅文档https://doc.sitecorepowershell.com/working-with-items

© www.soinside.com 2019 - 2024. All rights reserved.