Instantly share code, notes, and snippets.

What would you like to do?
Demonstrates how to relink images using Sitecore PowerShell Extensions.

This comment has been minimized.

AdamNaj commented Jun 3, 2014

I think it would be super useful if we added a couple of commandlets, based on that brilliant bit of code
like Get-ItemReferrers & possibly Relink-Item. You did it again! I didn't think it would be either that succinct or even viable!

Also - great use case scenario!


This comment has been minimized.


michaellwest commented Sep 7, 2017

Updated to use Get-ItemReferrer and Out-Null.


This comment has been minimized.

AlexKasaku commented Oct 1, 2018

Great script! Can I suggest this so that it works in multilingual scenarios:

$linkedItem = Get-Item -Path master:\ -ID $link.SourceItemID -Language $link.SourceItemLanguage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment