0
$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
4
  • Do you want to get the item after publish in a variable? Commented Feb 16, 2023 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. Commented Feb 16, 2023 at 9:51
  • So as per your comment the publish-item doesn't publish the item? Commented Feb 16, 2023 at 10:04
  • Which Sitecore and Powershell version?
    – Marek Musielak
    Commented Feb 16, 2023 at 10:45

0

Your Answer

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