I recently needed to re-create an item that had been deleted by accident and was no longer available in the recycling bin or anywhere else. However this item needed to be created again with the same Id to avoid a lot of re-configuration.
I figured I might be able to do this with SPE (Sitecore Powershell Extensions) and after some digging it turns out there is a –ForceId param supported by the ‘New Item‘ function that I hadn’t come across before.
It can be used like so – note: the -ForceId parameter that you will need to update to the Item Id you wish to use:
Once you’ve run this command you should see an item created with the Id you set as below:
I haven’t seen any other blog posts on this so hopefully it’s useful for anyone else who needs to do this in future.