Saturday, February 10, 2018

Sitecore Powershell::Publish Powershell result Item

Sitecore Powershell:: Publish Powershell result Item

I wrote some the PowerShell scripts as a part of my Sitecore Powershell learning. To publish the result item, each item I need to open the particular item and then need to publish it. So I wrote a simple Publish action script which will intern calls the “item:publish” shell command and do publish.



Created a Publish Item Action script under Internal->List View->Ribbon->Item ->Publish Item.


The Script body contains the below simple code:

foreach($Item in $selectedData)
{
Invoke-ShellCommand -Name "item:publish" -Item $Item

}




No comments:

Post a Comment