We're using Sitecore PowerShell Extensions to generate some reports. In one of our templates we have a field with the name Id. This id field is not being listed correctly by PSE because it is conflicting with the Item Id from Sitecore. How would we get our own id field in PSE instead of the Sitecore ID?

This is the shortened code.

Get-ChildItem -Path $root -Language * | Show-ListView -Property Id,Description
up vote 6 down vote accepted

Using the "Name/Expression scheme" I was able to retrieve the field just like in C#. This gets the correct field value.

Get-ChildItem -Path $root -Language * | Show-ListView -Property `
                 @{Label="Id"; Expression={$_.Fields["Id"].Value}}

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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