2

In Sitecore Powershell while running simple command like get-item or get-childitem i am getting following error.

Get-Item : The member "ProviderPath" is already present from the extended type data file.
At line:1 char:2
+  Get-Item  master:/sitecore/content/Test/TestPage
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-Item], ExtendedTypeSystemException
    + FullyQualifiedErrorId : AlreadyPresentInTypesXml,Microsoft.PowerShell.Commands.GetItemCommand
  • Can you paste the full line of code which is throwing error – Balaji Kuppuswamy May 18 '17 at 12:46
  • Are you making use of the Persistent Session ID? – Hishaam Namooya May 18 '17 at 19:41
1

The issue is because you have a mix of old and new SPE files in the sitecore instance.

The solution is to re-install the Sitecore Powershell Module. Preferably, install the latest one.

When installing the package, you need to overwrite all items and files.

2

Your error message is referencing a type file used in Windows PowerShell. The file has the extension .ps1xml; in our case the file is named Sitecore.Types.ps1xml.

In version 4.5 you can find the file under /sitecore modules/PowerShell/Assets/. Looking at this version, there is a ScriptProperty defined with that name. I recommend that you cleanup all the files generated by SPE in the previous version and then reinstall. Check out the Github repository if you want to see where the files were stored in that version...or perhaps open up the original package and see where they were dropped.

Please provide the original and current versions of SPE you have installed in that instance so we can provide a more detailed answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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