I'm running a script in which I want to mark as checked all renderings of a specific template with the Vary By Data parameter. But running the script it is adding to the Additional Parameters the value as opposed to checking the checkbox for the respective parameter as shown bellow:
Anyone know what I'm missing? Here is my script
$items = Get-ChildItem -Recurse | Where-Object {$_.TemplateID -match "{79A0F7AB-17C8-422C-B927-82A1EC666ABC}"} | ForEach-Object {
$renderingInstance = Get-Rendering -Item $_ -Rendering $rendering
if($renderingInstance){
Set-Rendering -Item $_ -Instance $renderingInstance -Parameter @{
VaryByData = "$true"
}
}}
__Final Renderings
and__Renderings
fields, then revert item (i suppose you've got source control), update the item with script and compare values in external tool. You will notice what is wrong there.