The Problem We created a new module (or component or rendering) in Sitecore and we needed to add this rendering to Allowed Controls field in the placeholder settings in Sitecore. It is also required to allow this rendering on all the placeholders in Sitecore so that content authors have the ability to add this rendering on pages in experience editor. Below is a snapshot of the field that is used for this- If the placeholders were in limited number, it would have been an easy manual job. But we had more than 20 placeholders for different page types. And we were in a process of introducing several new modules which meant this task is going to be repetitive and time consuming. So, to save time and for accuracy, we decided that we should develop a simple PowerShell script to make this process simple. The Solution We developed below script - $placeholders = Get-ChildItem "/sitecore/layout/Placeholder Settings/<path where your placeholders are present>" -recurse Foreach($pla
This blog is created to serve as a repository of quick tips for Sitecore developers. I have learnt a lot from the programming community and this is my attempt to give back to the community.