Are you installation Sitecore 9, Solr or Solr with SSL with PowerShell
scripts but facing the below errors:

“script.ps1 :File pathscript.ps1 cannot be loaded. The
file pathscript.ps1 is not digitally signed. You cannot run this script on the
current system.”

This is because the script you are running is not signed,
means scripts is not trusted to be run on the system.

Need to change the execution policy setting, based on your server policy and
requirement, try  to run the below command,
it will bypass or run the unsigned scripts for the current session.

Set-ExecutionPolicy Bypass


Set-ExecutionPolicy RemoteSigned


Set-ExecutionPolicy Unrestricted

Windows PowerShell has below different execution policies:

  • Restricted – No scripts can be run. Windows PowerShell can be used only in interactive mode.
  • AllSigned – Only scripts signed by a trusted publisher can be run.
  • RemoteSigned – Downloaded scripts must be signed by a trusted publisher before they can be run.
  • Unrestricted – No restrictions; all Windows PowerShell scripts can be run.
  • Bypass-  means nothing is blocked and no warnings, prompts, or messages will be displayed
I hope this blog will help you.

Happy Sitecoring

Leave a Reply

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