• Not Answered

How to get list of duplicate Items based on the field value

Hi,

I am trying to fetch list of duplicate Items from the content tree which has same value in a particular field. how do we compare field value of an Item using powershell.

for example: I have 10 item which has same template and there is a field called product ID. There are few items which has same product ID (ABC123). now I am trying to find all the items which has same product ID.

Thanks

1 Reply

  • Hello,

    You can refer to this blog post www.sitecored.com/.../sitecore-powershell-empty-fields.html which does something similar. That PSE script looks for items that have an empty field. It's not exactly what you are looking for, but it's definitely a good starting point. To accomodate to your needs, you will need to change the signature of the Is-ValidItem function to pass in the field value you want to filter on, and obviously, you will need to add a new parameter so that you can input the field value you want to filter on.