I'm new to Sitecore PowerShell (and PowerShell in general), and I would like to generate a script that adds a Template as a Base Template to a list of ChildItem Templates under a certain context folder.
Since __Base template is a standard value and not a regular Field, I'm not sure if there is a syntax available to append a GUID to the multilist field that it uses (pipe delimited).
Here's what I've tried
$master = Get-Database master;
$translationTemplate = $master.Templates["Path/To/Template/Needed/Translatable"];
$calloutTemplate = $master.Templates["Path/To/Example/Callout"];
#$translationTemplate;
$calloutTemplate += $translationTemplate;
I'm able to get all of the children recursively with Get-ChildItem -recursive, but for a test run, I just want to try it on one Template Item called Callout. Here's a view of the $calloutTemplate, showing that it has a BaseTemplates section and a Fields section (which should include __Base template):
If there is no solution in Powershell for Sitecore, would Sitecore Rocks Query analyser CRUD operations possibly work?