How can we uncheck a checkbox like "upload to cloud cdn" for Sitecore media library and republish it in Sitecore using powershell? Can anyone please help.


Sitecore stores checkbox value as bool, so if you want to uncheck a checkbox then you need to set the value empty or 0, see below sample code

$item.Fields["upload to cloud cdn"].Value = 0

here you first need to get the $item.

And to check the checkbox you can update the field with value 1.

Updates: To publish the item you can use the Publish-Item command and based on your requirement you can publish a single item, a single item with child items with different publishing targets and publishing modes. See - https://doc.sitecorepowershell.com/appendix/common/publish-item

  • But needs to republish also.
    – Akshay
    Nov 24 '20 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.