$singleitem=get-childItem -path $RootItemPath -Language 
"en" -Recurse  | Where {$_.TemplateName -eq "TEST"} | Select-Object -first 1

publish-item -Item $singleitem -publishmode Incremental -target $publishTargets -language $language
  • Do you want to get the item after publish in a variable? Feb 16 at 9:47
  • yes after the publish:end event i have a method that needs to execute, if i publish manually it works but not publishing via powershell script. Feb 16 at 9:51
  • So as per your comment the publish-item doesn't publish the item? Feb 16 at 10:04
  • Which Sitecore and Powershell version?
    – Marek Musielak
    Feb 16 at 10:45


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.