19,081 total views, 26 views today
Many times, we might face this issue like when we try to execute the PowerShell script (.ps1) file on our laptop or desktop we will get this error “<script path>.ps1 is not
digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.”
How to fix the script “is not digitally signed. You cannot run this script on the current system” issue?
In order to fix this issue, we need to execute the below command and change the execution policy setting before running the main script or we can add the below line at the begging of the .ps1 file from the PowerShell editor (Windows PowerShell ISE).
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Description: What exactly will do the above command?
- The above command sets the execution policy to bypass for only the current user PowerShell session.
- After executing the script, once the window is closed, the next PowerShell session will open running with the default execution policy – hence we see that this is not a permanent change in the policy, so no worry. 🙂
- The “Bypass” parameter means nothing is blocked and no warnings, prompts, or messages will be displayed, the script will continue to execute without any interruption (warning, message, etc).
Thus, in this troubleshooting article, we have learned about how to fix the error “<script path>.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.”
You may also look into the below SharePoint search troubleshooting articles:
- [Fixed]: Fix your SharePoint 2016 Search after installing security update
- [Fixed]: Full crawler is running but no items are shown in content source crawl log – SharePoint 2016
- [Fixed]: Incremental and Full crawl is not running automatically in SharePoint 2016
- Re-Provisioning SharePoint Search Service Application using PowerShell
- [Fixed]: Restore the timer service in SharePoint Server using PowerShell script
- Product Version Job: Collection was modified; enumeration operation may not execute
- [Fixed]: The page ‘catalogs/DeviceChannelMappings.aspx’ allows a limit of 11
- [Fixed]: The base type ‘.Search.UI.SearchResultsLayoutPage’ is not allowed for this page
- Custom search result page in SharePoint Online – SPFx PnP Modern Search solution
- [Fixed] How to fix the “Unexpected response from server. The status code of response is ‘500’ in SharePoint 2016 Search error.”?
- [Fixed] How to fix request timed out error in SharePoint 2016 search (There was no endpoint listening)?