Sitecore Poweshell Extensions - How can you authenticate without passing the user/password in the URL

We are using SPE via the restful2 interface.  It works great.  The issue is that we do not want to open this up to Anonymous users and we also cannot pass the username/password on the URL (security reasons).  For example:

We want to be able to just call the url:

We are using a powershell script to call the url on our Sitecore server.  If I enable restful2 but block Anonymous users, how can the script be called so I will not get the access error (403)?

  • Hi Scot,

    Here you could possibly do to solve your problem.

    Create a powershell script to set the environment variable on the server. This environment variable will be your credentials to call the url Deploy it on server and run it and verify the variable is set as expected.

    Now you can call the environment variables in the powershell script which actually calls the url and get the environment vaiable using $env  provider.

    You can get detail information on this site  on how to get and set envrionment variable.


    Hope this help you with your query