I am using Sitecore 10 as container environment. I added Sitecore Powershell module on top of Sitecore base image. You can refer to my question how to add it on Sitecore stackexchange –https://sitecore.stackexchange.com/questions/29098/add-spe-module-to-custom-sitecore-docker-image. I logged in as admin user but was getting error – “Could not validate access using provied credentials” while running powershell script –
Could not validate access using the provided credentials

To resolve this, I created patch file and added that in z.local folder. Please find the details of patch file –

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <powershell>
      <userAccountControl>       
        <tokens>      
         <token name="ISE" expiration="00:05:00" elevationAction="Password">
         <patch:attribute name="elevationAction">Allow</patch:attribute>
      </token>
    </tokens>
  </userAccountControl>
</powershell>

I am able to run powershell script in IDE editor now.
Happy Coding 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *