Pom*_*ame 1 powershell sitecore sitecore8
我有简单的 Sitecore8/PowerShell 脚本,在其中删除图像子项并发布父项:
$child1 = Get-Item $child1Path
Remove-Item $child1 -Force -Permanently
Publish-Item -Item $parent1 -Recurse -PublishMode SingleItem -Language "en*"
Run Code Online (Sandbox Code Playgroud)
运行时无删除且无错误。
我怎样才能找出它不删除的原因?
您可以将Remove-Item 与-Path 参数一起使用。或者使用
$child1 | 除去项目
显然,您的脚本不会抛出错误,但删除却无法以这种方式进行。请参阅文档https://doc.sitecorepowershell.com/working-with-items
归档时间: |
|
查看次数: |
6682 次 |
最近记录: |