Using Sitecore PowerShell Extensions I can set an item's text properties but an Image property cannot be set:

enter image description here

In the screenshot above, setting the Title property worked but none of the attempts at setting the Featured Image worked.

However from Content Editor when I specify a relative media library path, it works:

enter image description here

Is it possible to set an image field value with a media library item using Sitecore PowerShell Extensions? If so, how?

1 Answer 1


As described in the docs, you can do something as simple as the following:

$homeItem = Get-Item -Path "master:/content/home"
$homeItem.Image = Get-Item -Path "master:\media library\logo"
  • This makes a lot of sense since the Image field is getting an actual item and not just text. Thanks!
    – Anthony
    Commented Sep 18, 2022 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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